How to fix: mktime(): It is not safe to rely on the system’s timezone settings
Posted in Operating Systems, Linux, Services, Apache, Tips on Tuesday, March 19, 2013 by cam
You might encounter a similar error message perhaps running wordpress or some other webapp.
[Tue Mar 12 09:41:14 2013] [error] [client 1.2.3.4] PHP Warning: 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 'Australia/ACT' for 'EST/10.0/no DST' instead in /var/www/html/smarty/plugins/function.html_select_date.php on line 192
To resolve either fix the code or an easy fix is edit: /etc/php5/php.ini or /etc/php.ini depending on your operating system.
Look for the line:
;date.timezone =
and make it:
date.timezone = 'Australia/Brisbane'
See a list of supported timezones from here: http://www.php.net/manual/en/timezones.php