Fixing phpinfo() timezone error

I’m getting the following errors in my log file whenever I use phpinfo. But now 08:00 AM it still running yesterday 23:00PM. How can I solved this problem? I’m running Linux Apache server. Anyone care to help?

This problem or warning can be easily fixed by editing the /etc/php.ini file. Open a command-line terminal, and then type the following commands or login using ssh to the remote server.

#1 First find out your timezone from /etc/sysconfig/clock file:
$ cat /etc/sysconfig/clock
ZONE=”Asia/Kuala Lumpur”

#2 Edit /etc/php.ini:
$ vi /etc/php.ini

#3 Modify the changes as belows:

date.timezone=”Asia/Kuala Lumpur”

(find date.timezone and update it)

#4 Save and close the file. Check and Restart the Apache server:
$ /usr/sbin/apachectl -t
Syntax OK
$ /usr/sbin/apachectl restart

One Reply to “Fixing phpinfo() timezone error”

Leave a Reply

Your email address will not be published. Required fields are marked *