From e86a21bd83a0ae6cadfe9c919582951f306d3b64 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 06 Jan 2012 05:55:07 -0500 Subject: [PATCH] - Fix typo in timezone handling, more exception catching --- 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 e163957..0383364 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -254,9 +254,13 @@ */ 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; -- Gitblit v1.9.1