March 02 2013

PHP warning: getdate() [function.getdate]: It is not safe to rely on the system’s timezone settings

Tagged Under :

php
I face a weird problem in PHP. I just upgrade to php 5.3.0 and since the upgrade I’m getting the following warning:
Warning: getdate() [function.getdate]: 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.
And date.timezone also added. But the warning still there.

My solution is:
Update the php.ini error_reporting from E_ALL $ ~E_STRICT to E_ALL then restart the Apache. The warning wouldn’t appear anymore.

Make a Comment

*

code