Error with mktime in PHP 5.1 (Technics)
Hello
PHP Warning: date(): 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 /srv/www/htdocs/virtual/e24/includes/functions.inc.php on line 107
I found no hints for this problem....
Every call to a date/time function will generate a E_NOTICE if the time zone is not valid, and/or a E_STRICT or E_WARNING message if using the system settings or the TZ environment variable. See also date_default_timezone_set()
Accentuation by me.
The below specified line numbers refers to mlf 2.3.
Alex sets the default timezone via the function date_default_timezone_set
in includes/main.inc.php
in the line 92 and in line 111 in the case a registered user has not setted his own timezone. The function daily_actions
where the error occurs is called in includes/main.inc.php
, line 85 before the default timezone is defined. That said, the function daily_actions
uses the system setting or the TZ-database instead. At that point the error occurs.
An untested fix is, to move the function daily_actions
to a point after the block where the timezone will be defined (behind line 114).
[edit]A better solution would be the use of a external script, wich is called with a cronjob (if possible) instead the function daily_actions
inside the program context.[/edit]
Tschö, Auge
--
Trenne niemals Müll, denn er hat nur eine Silbe!