Skip to content

Commit 553a867

Browse files
committed
might fix projecthorus#414 - not sure
1 parent 32d4c56 commit 553a867

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

js/station.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -632,26 +632,26 @@ function launchSitePredictions(times, station, properties, marker, id) {
632632
var date = new Date();
633633
var time = times[i].split(":");
634634
if (time[0] != 0) {
635-
date.setDate(date.getDate() + (7 + time[0] - date.getDay()) % 7);
635+
date.setUTCDate(date.getUTCDate() + (7 + time[0] - date.getUTCDay()) % 7);
636636
}
637637
date.setUTCHours(time[1]);
638638
date.setUTCMinutes(time[2]);
639-
date.setSeconds(0);
640-
date.setMilliseconds(0);
639+
date.setUTCSeconds(0);
640+
date.setUTCMilliseconds(0);
641641
// launch time 45 minutes before target time
642-
date.setMinutes( date.getMinutes() - 45 );
642+
date.setUTCMinutes( date.getUTCMinutes() - 45 );
643643
while (date < now) {
644644
if (time[0] == 0) {
645-
date.setDate(date.getDate() + 1);
645+
date.setUTCDate(date.getUTCDate() + 1);
646646
} else {
647-
date.setDate(date.getDate() + 7);
647+
date.setUTCDate(date.getUTCDate() + 7);
648648
}
649649
}
650650
if (day > 0) {
651651
if (time[0] == 0) {
652-
date.setDate(date.getDate() + day);
652+
date.setUTCDate(date.getUTCDate() + day);
653653
} else {
654-
date.setDate(date.getDate() + (7*day));
654+
date.setUTCDate(date.getUTCDate() + (7*day));
655655
}
656656
}
657657
if (count < maxCount) {

0 commit comments

Comments
 (0)