Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-02-03 06:17:11 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-02-03 06:17:11 +0400
commitc1f3f9c3d675ab40b3a1a7b73bcbbace2e42165c (patch)
tree9e75ff94b1d482761e2d4a41b0ffbe44703861c3 /core/ScheduledTime.php
parentf82bf3c9715df2923b390461cc421433d59490b1 (diff)
fix expected date for auckland / new zealand was wrong
Diffstat (limited to 'core/ScheduledTime.php')
-rw-r--r--core/ScheduledTime.php7
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) {