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:
Diffstat (limited to 'plugins/ScheduledReports/Controller.php')
-rw-r--r--plugins/ScheduledReports/Controller.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/ScheduledReports/Controller.php b/plugins/ScheduledReports/Controller.php
index 3192a3cfc4..7316f6283d 100644
--- a/plugins/ScheduledReports/Controller.php
+++ b/plugins/ScheduledReports/Controller.php
@@ -26,7 +26,11 @@ class Controller extends \Piwik\Plugin\Controller
$view = new View('@ScheduledReports/index');
$this->setGeneralVariablesView($view);
- $view->countWebsites = count(APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess());
+ $siteTimezone = $this->site->getTimezone();
+ $dateTimeZone = new \DateTimeZone($siteTimezone);
+
+ $view->timeZoneDifference = $dateTimeZone->getOffset(new \DateTime()) / 3600;
+ $view->countWebsites = count(APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess());
// get report types
$reportTypes = API::getReportTypes();