Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (Revision 6331) +++ t3lib/config_default.php (Arbeitskopie) @@ -94,6 +94,7 @@ 'setMemoryLimit' => 0, // Integer, memory_limit in MB: If more than 16, TYPO3 will try to use ini_set() to set the memory limit of PHP to the value. This works only if the function ini_set() is not disabled by your sysadmin. 'forceReturnPath' => 0, // Boolean: Force return path to be applied in mail() calls. If this is set, all calls to mail() done by t3lib_htmlmail will be called with '-f as the 5th parameter. This will make the return path correct on almost all Unix systems. There is a known problem with Postfix below version 2: Mails are not sent if this option is set and Postfix is used. On Windows platforms, the return path is set via a call to ini_set. This has no effect if safe_mode in PHP is on. 'serverTimeZone' => 1, // Integer, GMT offset of servers time (from time()). Default is "1" which is "GMT+1" (central european time). This value can be used in extensions that are GMT aware and wants to convert times to/from other timezones. + 'phpTimeZone' => '', // String: timezone to force for all date() and mktime() functions. A list of supported values can be found at http://php.net/manual/en/timezones.php. If this is not set, a valid fallback will be searched by PHP (php.ini's date.timezone setting, server defaults, etc) and if no fallback is found, the value of "UTC" is used instead. 'systemLog' => '', // String, semi-colon separated list: Defines one or more logging methods. Possible methods: file,[,];mail,[/][,];syslog,,[,];error_log[,,]. "file" logs to a file, "mail" sends the log entries via mail, "syslog" uses the operating system's log, "error_log" uses the PHP error log. The level is the individual logging level (see [SYS][systemLogLevel]. Facility may be one of LOCAL0..LOCAL7, USER (on Windows USER is the only valid type). 'systemLogLevel' => 0, // Integer: Only messages with same or higher severity are logged; 0 is info, 1 is notice, 2 is warning, 3 is error, 4 is fatal error. 'enableDeprecationLog' => 1, // Boolean: Enables the logging of deprecated methods and functions. The log file will be written to typo3conf/deprecation_[hash-value].log @@ -392,6 +393,14 @@ if (!@is_file(PATH_typo3conf.'localconf.php')) die('localconf.php is not found!'); require(PATH_typo3conf.'localconf.php'); +// Set timezone +if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['phpTimeZoneForce'])) { + date_default_timezone_set($GLOBALS['TYPO3_CONF_VARS']['phpTimeZoneForce']); +} else if (date_default_timezone_get() == '') { + // Defaults to UTC to avoid PHP 5.3 warnings (behaviour like PHP <5.3) + date_default_timezone_set('UTC'); +} + // Defining the database setup as constants define('TYPO3_db', $typo_db); define('TYPO3_db_username', $typo_db_username);