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
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Period/Factory.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/Period/Factory.php b/core/Period/Factory.php
index b316bebefa..7c804df611 100644
--- a/core/Period/Factory.php
+++ b/core/Period/Factory.php
@@ -168,10 +168,9 @@ abstract class Factory
} else {
if (!($date instanceof Date)) {
if (preg_match('/^(now|today|yesterday|yesterdaySameTime|last[ -]?(?:week|month|year))$/i', $date)) {
- $date = Date::factory($date, $timezone);
- } else {
- $date = Date::factory($date);
+ $date = Date::factoryInTimezone($date, $timezone);
}
+ $date = Date::factory($date);
}
$oPeriod = Factory::build($period, $date);
}