Linux – Changing the timezone

In /etc the file, localtime, is a link to or copy of a file containing information about your time zone.

Zone information files are usually in /usr/share/zoneinfo but this depends on your distribution. So if your localtime file points to a zone info file that is not your time zone you can change it by browsing the directories in /usr/share/zoneinfo to find your country, then find your city or a city in the same time zone and link localtime to it.

$ ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Some applications may use the configuration file /etc/sysconfig/clock to determine the current time zone so it’s a good idea to set the ZONE entry (e.g. “America/Los_Angeles”).

Leave a Reply

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

*