Page 1 of 1

PHP Warning: date_default_timezone_get() [SOLVED]

Posted: Tue Dec 07, 2010 4:23 am
by jwdonal
I'm not sure if this is an s9y bug or something I'm doing wrong (more likely =D), but I get the following warning messages in my apache error log anytime someone accesses any of my s9y blog sites.

PHP Warning: date_default_timezone_get(): 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 'UTC' for 'UTC/0.0/no DST' instead in <htdocs_directory>/my_s9y_blog/include/compat.inc.php on line 322

Does anyone know how I can fix these warnings?

Thanks!

Jonathon

Re: PHP Warning: date_default_timezone_get()

Posted: Tue Dec 07, 2010 11:15 am
by garvinhicking
Hi!

You should check your php.ini value for "date.timezone" and set it to your server's timezone!

HTH,
Garvin

Re: PHP Warning: date_default_timezone_get()

Posted: Wed Dec 08, 2010 7:55 am
by jwdonal
That worked!! No more hundreds of errors! THANKS! =D