Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Configuration > Issue <<  49 of 608 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 3981
Last update: 04-18-05
Issue:
How do I change my system timezone from the command line without using redhat-config-date?
Resolution:

In order to change the timezone of your system you will need to access the file /etc/sysconfig/clock directly:

 
#ZONE="America/New_York"
ZONE="GMT"
UTC=false
ARC=false

Note:If your system's BIOS stores UTC (Coordinated Universal Time) time, then set UTC to true. If your system's BIOS stores local time, then set UTC to false. UTC in the configuration file must always reflect your BIOS settings. If your server is in a time zone that observes daylight saving time, or if the server's users will connect from different geographical locations with different time zones, it is adviseable to store to store UTC in the BIOS and set the UTC parameter to true.

In order to get the particular zone you wish to use you must associate ZONE with a file located in /usr/share/zoneinfo. It is wise to note the directory structure because if you need to set the timezone to that of Shanghai which is located in the Asia directory you will then have to set your ZONE variable to the following:

ZONE="Asia/Shanghai"

Or perhaps you need to set the timezone to that of East Brazil:

ZONE="Brazil/East"

Finally save the file /etc/sysconfig/clock and on next reboot the system will be set to the defined timezone.

For the time on the machine to reflect the change timezone we need to link the zoneinfo file to /etc/localtime. This can be done as follows:

If you are setting your timezone to "Brazil/East" link the following file to /etc/localtime:

 
# ln -sf /usr/share/zoneinfo/Brazil/East /etc/localtime

Now by typing the date command to display the time you should see if reflect the newly linked timezone:

 
# date
Thu Sep 30 10:06:23 BRT 2004


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Configuration > Issue <<   49  of  608  >>