From ee4efc78186507efbee9a55fc889d37ab570f199 Mon Sep 17 00:00:00 2001 From: alec Date: Fri, 6 Jan 2012 10:55:07 +0000 Subject: - Fix typo in timezone handling, more exception catching git-svn-id: https://svn.roundcube.net/trunk@5733 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_config.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'roundcubemail/program/include/rcube_config.php') 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; -- cgit v1.2.3