X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_timezones.inc;h=8c3ae9969804e73d1ce49fb28448e973096ffc34;hb=04cf3914433415713303361dcdef3bf864d98444;hp=1b30d53f200de1672542637e107fa0b8021b0c16;hpb=23a91913767919c43f955069121f759fe51a0c12;p=gosa.git 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);