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-04 23:39:44 +0300
committersgiehl <stefan@piwik.org>2016-10-05 00:05:32 +0300
commitb8d15f6e8db5fa09811884d9eab0ad67190d8f55 (patch)
tree435fc9134c2fc3ef3f95a438d7d3889f67b927ad /core/Date.php
parentd3c5f504e2f51e652d27215ce74c1b92e71c903b (diff)
move fix of broken update script to 2.16.5
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Date.php b/core/Date.php
index 8922ed8ac2..dd2051a1a0 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -258,7 +258,7 @@ class Date
}
/**
- * Converts a timestamp in a from UTC to a timezone.
+ * Converts a timestamp from UTC to a timezone.
*
* @param int $timestamp The UNIX timestamp to adjust.
* @param string $timezone The timezone to adjust to.
@@ -266,6 +266,10 @@ class Date
*/
public static function adjustForTimezone($timestamp, $timezone)
{
+ if (empty($timezone)) {
+ return $timestamp;
+ }
+
// manually adjust for UTC timezones
$utcOffset = self::extractUtcOffset($timezone);
if ($utcOffset !== false) {