Changing the Time Zone on Linux
scottalanmiller last edited by
Every so often one must change the time zone setting on a Linux machine. This change is far from intuitive but is pretty simple to do today.
This is a two step process. First we modify one file and then we symlink a second file.
The first file to alter is /etc/sysconfig/clock. There is a directive in this file called ZONE. Zone will equal the name of the time zone that you want to select. Options include things like “America/New_York”, “GMT” or “UTC”. The list of all available time zone options can be viewed in the directory /usr/share/zoneinfo/.
Once your clock setting is correct all we need to do is to symlink the correct timezone file, the same one that you just selected above, to be pointed to by the /etc/localtime symlink. If moving to UTC, for example, you would use this command:
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
You can check that the timezone has changed with the date command.
Reference: Red Hat Manual on Time Zones