Page 1 of 1

date.timezone error in error_log

Posted: Fri Sep 23, 2011 5:59 pm
by jrmartin
I changed the /etc/php.ini file
; http://www.php.net/manual/en/datetime.c ... e.timezone
; date.timezone = Pacific/PST
date.timezone = America/Los_Angeles

however I am still getting these in my /var/log/httpd/error_log every minute or so.. How can I adjust this so it is proper? Thanks!
Jeff


[Fri Sep 23 15:56:47 2011] [error] [client 159.119.105.96] PHP Warning: strtotime(): 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://nadc-nag-p01/nagiosxi/

Re: date.timezone error in error_log

Posted: Mon Sep 26, 2011 11:01 am
by lmiltchev
Did you restart the apache after you edited your php.ini file? If you forgot to do so, run:

Code: Select all

# service httpd stop
# service httpd start
You can also try to "bring your system time up to date" by:

Code: Select all

# yum install ntp
# ntpdate pool.ntp.org
You can also add this to your crontab:

Code: Select all

# crontab -e
For example, if you want to run it every day at 9:30, you can add this line to your crontab:

Code: Select all

# 30 9 * * * /usr/sbin/ntpdate pool.ntp.org

Re: date.timezone error in error_log

Posted: Mon Sep 26, 2011 1:40 pm
by jrmartin
Thanks.. yes I forgot to restart httpd... that fixed it..

Re: date.timezone error in error_log

Posted: Mon Sep 26, 2011 4:08 pm
by lmiltchev
Great!