oreilly.comSafari Books Online.Conferences.

Apache FAQ
Linux FAQ

Log in to particpate

   Linux FAQ > 8. How To Do This or Find Out That...
Question:  8.10. How To Set the Time Zone.

Change directory to /usr/lib/zoneinfo/. Get the time zone package if you don't have this directory. The source is available in

Then make a symbolic link named localtime pointing to one of the files in this directory (or a subdirectory), and one called posixrules pointing to localtime. For example:

   $ ln -sf US/Mountain localtime
   $ ln -sf localtime posixrules

This change will take effect immediately—try date.

If the system uses Red Hat-style configuration files, the respective time zone info files are /usr/share/zoneinfo and /etc/localtime.

The manual pages for tzset or tzselect describe setting the time zone. Some programs recognize the "TZ" environment variable, but this is not POSIX-correct.

You should also make sure that your Linux kernel clock is set to the correct GMT time. Type date -u and check that the correct UTC time is displayed. ("The Computer Has the Wrong Time.")

This FAQ is from Linux Frequently Asked Questions with Answers, maintained by Robert Kiesling

Sponsored by: