Fix UTC
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
65366ff09b
commit
428e3b002d
@ -16,7 +16,7 @@ export class HasPackageDirective implements OnInit,OnDestroy{
|
|||||||
private packSub:Subscription;
|
private packSub:Subscription;
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.packages$.subscribe((packages) => {
|
this.packages$.subscribe((packages) => {
|
||||||
const today = new Date(Date.prototype.getUTCDate()).setHours(0,0,0,0);
|
const today = new Date(new Date(Date.now()).toUTCString()).setHours(0,0,0,0);
|
||||||
if (packages[this.package] &&
|
if (packages[this.package] &&
|
||||||
packages[this.package].enabled &&
|
packages[this.package].enabled &&
|
||||||
(packages[this.package].dataDate && new Date(packages[this.package].dataDate).setHours(0, 0, 0, 0) <= today) &&
|
(packages[this.package].dataDate && new Date(packages[this.package].dataDate).setHours(0, 0, 0, 0) <= today) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user