Page 1 of 1

date.timezone warning

Posted: Sun May 02, 2010 8:38 am
by twistedphrame
Hello everyone,

I recently installed php version 5.3.2 onto my windows 7 machine with Apache 2.2. When running php.info() I get the error

"Warning: phpinfo(): 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 'America/New_York' for '-4.0/DST' instead in C:\webserver\webroot\php_html_things _notwith_ee\config.php on line 1 Warning: phpinfo(): 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 'America/New_York' for '-4.0/DST' instead in C:\webserver\webroot\php_html_things _notwith_ee\config.php on line 1 "

In my php.ini file I've already set the default timzone with this:
date_default_timezone_set('America/New_York');

I also looked at the configuration file path and saw it was:
C:\Windows
so I added a copy of my php.ini to that directory (not sure that made any sense but I figured it wouldn't change anything if it didn't).

I'm not sure of anything else I need to do to get this to run properly.
Thanks for your help
~twistedphrame

Re: date.timezone warning

Posted: Sun May 02, 2010 9:21 am
by Jonah Bron
Do you mean you put that function into the php.ini file?

Re: date.timezone warning

Posted: Sun May 02, 2010 10:31 am
by flying_circus
date_default_timezone_set('America/New_York'); Needs to go into yout PHP file, not php.ini.

If you want to set the timezone in your php.ini file, use: date.timezone = "America/New_York"