Always having difficulty on how to change time zone on CentOS 6? Just bookmark this page and everything will be solved.
Identify your current time zone
There are two ways to identify your current time zone.
date
or
ls -l /etc/localtime
Change time zone
Change “Amercia/Chicago” to the respective time zone that you want.
cp /etc/localtime /root/old.timezone rm /etc/localtime ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
[Additional] Change PHP time zone
nano /etc/php.ini
Search for this line
;date.timezone =
Change it to
date.timezone = Asia/Singapore
Of course change it the time zone you want it to be
After running the commands above, remember to run the first step again to check that your time zone has been updated successfully.
That’s it. Changing CentOS 6 time zone is as simple as this.
This made it a lot easier, thanks. I m hoping this change in server time will reflect on Awstats so the reports are in sync with my local time.
Be sure to reboot your SQL server. Otherwise it will continue to operate in the old time zone. This can cause problems that are hard to debug.