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:
authorsgiehl <stefan@piwik.org>2016-10-03 23:17:30 +0300
committersgiehl <stefan@piwik.org>2016-10-04 00:16:00 +0300
commit4c38c16a4992ecd8b081ec8264157eeee1a6ecf5 (patch)
treeb751ca132c615854004ded0becfff807e0adbacc /plugins
parenta16ea5af913cc20527cf3f2fbc1766c91c64d366 (diff)
move timezone offest calculation to date class
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ScheduledReports/Controller.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/ScheduledReports/Controller.php b/plugins/ScheduledReports/Controller.php
index 8bdca90ab7..789b30fbc4 100644
--- a/plugins/ScheduledReports/Controller.php
+++ b/plugins/ScheduledReports/Controller.php
@@ -29,10 +29,7 @@ class Controller extends \Piwik\Plugin\Controller
$siteTimezone = $this->site->getTimezone();
- $timestampUTC = Date::today()->getTimestampUTC();
- $timestampZone = Date::adjustForTimezone($timestampUTC, $siteTimezone);
-
- $view->timeZoneDifference = ($timestampZone - $timestampUTC) / 3600;
+ $view->timeZoneDifference = Date::getUtcOffset($siteTimezone) / 3600;
$view->countWebsites = count(APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess());
// get report types