diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-06 10:55:07 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-06 10:55:07 +0000 |
| commit | ee4efc78186507efbee9a55fc889d37ab570f199 (patch) | |
| tree | 832c3d03ab52c601e4805fdc6a0f87785a324b0b /roundcubemail/program/include/rcube_config.php | |
| parent | efbd7fdce36f3ecbc53623eeff93b7998fcc7528 (diff) | |
- Fix typo in timezone handling, more exception catching
git-svn-id: https://svn.roundcube.net/trunk@5733 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_config.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_config.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_config.php b/roundcubemail/program/include/rcube_config.php index e16395711..038336480 100644 --- a/roundcubemail/program/include/rcube_config.php +++ b/roundcubemail/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; |
