From: hickert Date: Wed, 18 Jul 2007 06:12:31 +0000 (+0000) Subject: Updated error timezone handling. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c8a4844afe725aa7bc9cc97c6e5164275463a1b9;p=gosa.git Updated error timezone handling. Incorrect timezone setting will cause print_red error message git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6897 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_timezones.inc b/include/class_timezones.inc index 3c2534dd0..1b30d53f2 100644 --- a/include/class_timezones.inc +++ b/include/class_timezones.inc @@ -49,7 +49,9 @@ function get_default_timezone($stamp = NULL) /* Check if we could use the PHP5 default timezone functions */ if(function_exists("date_default_timezone_set")){ - date_default_timezone_set($tz); + if(!@date_default_timezone_set($tz)){ + print_red(sprintf(_("The timezone setting \"".$tz."\" in your gosa.conf is not valid. Can not calculate correct timezone offest."),$tz)); + } $tz_delta = date("Z", $stamp); $tz_delta = $tz_delta / 3600 ; return(array("name" => $tz, "value" => $tz_delta));