PHP timezone settings

May 7th, 2011

I just did a fresh install of AMP and the first php app I installed gave me the following 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 ‘UTC’ for ‘UTC/0.0/no DST’

 

It turned out to be a quick fix.

First go to this page and find the syntax for your timezone.

http://nl3.php.net/manual/en/timezones.php

Once you have this edit your php.ini file and add the following to it

(If you are using a distro ini search for date to find the example)

date.timezone = “America/New_York”
Exchange the proper timezone for your region

 

 

 

Entry Filed under: Centos,FreeBSD,Windows

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

September 2017
M T W T F S S
« May    
 123
45678910
11121314151617
18192021222324
252627282930  

Most Recent Posts