From b79404fd728371683b1f9bc4532960387a2b0428 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 18 Jul 2007 06:26:43 +0000 Subject: [PATCH] Added error message for php4 handling of zones. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6901 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_timezones.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/class_timezones.inc b/include/class_timezones.inc index 1b30d53f2..8c3ae9969 100644 --- a/include/class_timezones.inc +++ b/include/class_timezones.inc @@ -67,6 +67,7 @@ function get_default_timezone($stamp = NULL) $dst_zones = $tmp['DST_ZONES']; /* Detect zone and calculate offset */ + $found = FALSE; foreach($zones as $name => $value){ if(preg_match("#".normalizePreg($name)."#i",$tz)){ $offset = $value / 3600 ; @@ -74,8 +75,14 @@ function get_default_timezone($stamp = NULL) $offset ++; } $zone = array("name" => $name, "value" => $offset); + $found = TRUE; + break; } } + if(!$found){ + print_red(sprintf(_("The timezone setting \"".$tz."\" in your gosa.conf is not valid. Can not calculate correct timezone offest."), +$tz)); + } } } return($zone); -- 2.30.2