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 '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 f4a76cf0dc..43628cf93c 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) {