summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eee08ae)
raw | patch | inline | side by side (parent: eee08ae)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Sep 2007 12:08:32 +0000 (12:08 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Sep 2007 12:08:32 +0000 (12:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7352 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history | |
include/php_setup.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index cb48b17f2190e50b8c93bbbe01a0f2ef897b5b8d..ba51ca91134912fb964f36dc4d721629d9be64a4 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
$tz = $config->data['MAIN']['TIMEZONE'];
}
- /* 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));
- }
- $tz_delta = date("Z", $stamp);
- $tz_delta = $tz_delta / 3600 ;
- return(array("name" => $tz, "value" => $tz_delta));
-
- }else{
-
- /* We can't use the PHP integrated functions
- * so we use the zone informations returned by _get_tz_zones
- * and calculate the the zone offset.
- */
- $tmp = _get_tz_zones();
- $zones = $tmp['TIMEZONES'];
- $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 ;
- if(isset($dst_zones[$name]) && (date("I",$stamp) == 1)){
- $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));
- }
+ 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));
+
}
return($zone);
}
diff --git a/include/php_setup.inc b/include/php_setup.inc
index 096518f0934abd527f04e7ce8f68b1442bf33cda..98f8db70974bd27dd7860febdbecc8d6acfb7bb6 100644 (file)
--- a/include/php_setup.inc
+++ b/include/php_setup.inc
return;
}
- /* FIXME: Same as above. Compatibility does error flooding.*/
- if (preg_match('/zend.ze1_compatibility_mode/', $errstr)){
- return;
- }
-
/* Hide ldap size limit messages */
if (preg_match('/ldap_error/', $errstr)){
if (preg_match('/sizelimit/', $errstr)){
"\n\n".
"*** GOsa bug report ***".
"\nGOsa Version: ".get_gosa_version().
- "\nDate: ".date("d.m.Y").
- "\nTime: ".date("H:i:s").
"\n\n".
"Please describe what you did to produce this error as detailed as possible. Can you ".
"reproduce this bug using the demo on http://www.gosa-project.org ?".
$smarty->php_handling= SMARTY_PHP_REMOVE;
/* Set timezone */
-if (function_exists("date_default_timezone_set")){
- date_default_timezone_set("GMT");
-}
+date_default_timezone_set("GMT");
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>