index 1b30d53f200de1672542637e107fa0b8021b0c16..26369328468665761bd78b33753184c52f226d3c 100644 (file)
/* Check if we could use the PHP5 default timezone functions */
if(function_exists("date_default_timezone_set")){
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));
+ print_red(sprintf(_("The timezone setting '%s' in your gosa.conf is not valid. Can not calculate correct timezone offset."),$tz));
}
$tz_delta = date("Z", $stamp);
$tz_delta = $tz_delta / 3600 ;
$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 ;
$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);