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:
authormattpiwik <matthieu.aubry@gmail.com>2011-04-17 22:29:58 +0400
committermattpiwik <matthieu.aubry@gmail.com>2011-04-17 22:29:58 +0400
commit53f3dda7c3cbac4943bd45f426872a8ef77db01c (patch)
tree58e64e4cd5d8d05302249b5916f9f3b37a7930e6 /core/Date.php
parent58845ed5f7144650daa9d4b5d82e695f9f0e4de1 (diff)
Fixes Timezone ID '' is invalid in /homepages/4/d23401398/htdocs/typo3conf/piwik/piwik/core/Date.php on line 88
git-svn-id: http://dev.piwik.org/svn/trunk@4494 59fd770c-687e-43c8-a1e3-f5a4ff64c105
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);