Tuesday, September 7, 2010

PHP 5.3 and wordpress

SkyHi @ Tuesday, September 07, 2010
ERROR:
Warning: date() [function.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/Helsinki' for 'EEST/3.0/DST' instead in /path/to/my/www/wp-includes/functions.php on line 43

Solution:

I have run into the same issue and here is what I did to resolve it:


In /wp/wp-includes/functions.php


Add the following before the first function:


date_default_timezone_set('UTC');


Not sure if this is the best place to put this but some of the other places I tried it didn't work or only worked for certain parts of WordPress



OR



Another way to approach this is to let php know
what your time zone is. You can edit your php.ini file and put in the
following line:


date.timezone = "America/Anchorage"


You can find valid time zone strings at http://nl3.php.net/manual/en/timezones.php



REFERENCES

http://wordpress.org/support/topic/php-530-amp-wp-28-it-is-not-safe-to-rely-on-the-systems-timezone