diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-03 06:17:11 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-03 06:17:11 +0400 |
commit | c1f3f9c3d675ab40b3a1a7b73bcbbace2e42165c (patch) | |
tree | 9e75ff94b1d482761e2d4a41b0ffbe44703861c3 /core/ScheduledTime.php | |
parent | f82bf3c9715df2923b390461cc421433d59490b1 (diff) |
fix expected date for auckland / new zealand was wrong
Diffstat (limited to 'core/ScheduledTime.php')
-rw-r--r-- | core/ScheduledTime.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/ScheduledTime.php b/core/ScheduledTime.php index 5060a33d56..53e1e86793 100644 --- a/core/ScheduledTime.php +++ b/core/ScheduledTime.php @@ -138,12 +138,15 @@ abstract class ScheduledTime $dateInTimezone = Date::factory($arbitraryDateInUTC, $this->timezone); $midnightInTimezone = date('H', $dateInTimezone->getTimestamp()); - $hoursDifference = (24 - $midnightInTimezone) % 24; if ($arbitraryDateInUTC->isEarlier($dateInTimezone)) { - $hoursDifference = -1 * $hoursDifference; + $hoursDifference = 0 - $midnightInTimezone; + } else { + $hoursDifference = 24 - $midnightInTimezone; } + $hoursDifference = $hoursDifference % 24; + $rescheduledTime += (3600 * $hoursDifference); if ($this->getTime() > $rescheduledTime) { |