lotus



previous page: 122. How To Enable and Select Virtual Consoles
  
page up: Linux FAQ
  
next page: 124. What Is a core File?

123. How To Set the Time Zone




Description

This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).

123. How To Set the Time Zone

A: Change directory to /usr/lib/zoneinfo/. Get the time zone package if you don't have this directory. The source is available in ftp://metalab.unc.edu/ pub/Linux/system/admin/time/.

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 immediatelytry 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. See Why Does the Computer Have the Wrong Time?.

 

Continue to:















TOP
previous page: 122. How To Enable and Select Virtual Consoles
  
page up: Linux FAQ
  
next page: 124. What Is a core File?