diff options
author | alecpl <alec@alec.pl> | 2012-01-06 10:55:07 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-01-06 10:55:07 +0000 |
commit | e86a21bd83a0ae6cadfe9c919582951f306d3b64 (patch) | |
tree | b14409fe920c6389499a3e5400781495b9dd8833 /program/include/rcube_config.php | |
parent | 529bd3f1c49be04c5eba851db2621b5b94940a89 (diff) |
- Fix typo in timezone handling, more exception catching
Diffstat (limited to 'program/include/rcube_config.php')
-rw-r--r-- | program/include/rcube_config.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index e16395711..038336480 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -254,9 +254,13 @@ class rcube_config */ public function get_timezone() { - if ($this->get('timezone')) { - $tz = new DateTimeZone($this->get('timezone')); - return $tz->getOffset(new DateTime('now')) / 3600; + if ($tz = $this->get('timezone')) { + try { + $tz = new DateTimeZone($tz); + return $tz->getOffset(new DateTime('now')) / 3600; + } + catch (Exception $e) { + } } return 0; |