Bug #21742
closedPHP Warning: mktime()
0%
Description
The page module shows a lot of PHP warnings for mktime in PHP 5.3.1.
PHP Warning
PHP Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/html/typo3conf/temp_CACHED_ps006c_ext_tables.php line 155
// **********************************************************
// Extend 'pages'-table
// **********************************************************
if (TYPO3_MODE=='BE') {
// Setting ICON_TYPES (obsolete by the removal of the plugin_mgm extension)
$ICON_TYPES = array(
'shop' => array('icon' => 'gfx/i/modules_shop.gif'),
...
'endtime' => array (
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
'config' => array (
'type' => 'input',
'size' => '8',
'max' => '20',
'eval' => 'date',
'checkbox' => '0',
'default' => '0',
'range' => array (
'upper' => mktime(0,0,0,12,31,2020),
)
)
),
in /var/www/html/typo3_src-4.3.0RC2/typo3/sysext/cms/tbl_tt_content.php line 111
in /var/www/html/typo3_src-4.3.0RC2/typo3/sysext/cms/tbl_cms.php line 246
in /var/www/html/typo3_src-4.3.0RC2/typo3/sysext/cms/tbl_cms.php line 520
in /var/www/html/typo3_src-4.3.0RC2/typo3/sysext/cms/tbl_cms.php line 765
in /var/www/html/typo3_src-4.3.0RC2/t3lib/class.t3lib_div.php line 4490
in /var/www/html/typo3_src-4.3.0RC2/t3lib/stddb/tbl_be.php line 284
(issue imported from #M12842)
Updated by Oliver Hader almost 15 years ago
Hi Franz,
thanks for pointing this out. However, there's not much TYPO3 can do about it, since a proper configuration in php.ini is required.
Updated by Franz Holzinger almost 15 years ago
Hello Oliver,
I have now added this to the file php.ini:
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
;date.timezone =
date.timezone = Europe/Berlin
And the warning messages have gone.
It would be fine, if TYPO3 could send this info instead of the error message of PHP.
Updated by Steffen Kamper almost 15 years ago
there is already a patch - please search first: #20786
Updated by Chris topher over 14 years ago
Please continue the discussion in #20786. Thanks!