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 43e6a4e707..3c7962ce1e 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -79,7 +79,7 @@ class Piwik_Date
{
$date = new Piwik_Date($dateString);
}
- if(is_null($timezone))
+ if(empty($timezone))
{
return $date;
}
@@ -205,6 +205,10 @@ class Piwik_Date
*/
public function getTimestamp()
{
+ if(empty($this->timezone))
+ {
+ $this->timezone = 'UTC';
+ }
$utcOffset = self::extractUtcOffset($this->timezone);
if($utcOffset !== false) {
return (int)($this->timestamp - $utcOffset * 3600);