Jared Stenquist » Page 'Changing Timezone on CentOS via NTP'

Changing Timezone on CentOS via NTP

If your server is showing the wrong date/time due to using the incorrect timezone, you can modify it quite easily.

For example, the time on my east coast servers were running on Central Time.

[root@app-1]# date
[root@app-1]# Wed Aug 18 11:05:13 CST 2010

First browse to the folder of timezones and locate yours

[root@app-1]# cd /usr/share/zoneinfo/

Now you will copy the correct timezone over the currently used incorrect zone at /etc/localtime.
For example mine is /usr/share/zoneinfo/US/Eastern

[root@app-1]# cp /usr/share/zoneinfo/US/Eastern /etc/localtime
[root@app-1]# cp: overwrite '/etc/localtime'? y
Now let’s check the date again. It should be an hour a head of the original time and using the Eastern timezone.
[root@app-1]# date
[root@app-1]# Wed Aug 18 12:05:13 EDT 2010

No related posts.

Posted in Questions Answered, Tutorial

Leave a comment

You need to log in to comment.