Fix UTC
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter (extern) 2021-01-18 16:45:37 +01:00
parent 65366ff09b
commit 428e3b002d

View File

@ -16,7 +16,7 @@ export class HasPackageDirective implements OnInit,OnDestroy{
private packSub:Subscription;
ngOnInit() {
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] &&
packages[this.package].enabled &&
(packages[this.package].dataDate && new Date(packages[this.package].dataDate).setHours(0, 0, 0, 0) <= today) &&