Changing Timezone

7:47 PM

How do I change my system timezone from the command line without using redhat-config-date?

In order to change the timezone of your system you will need to access the file /etc/sysconfig/clock directly:
ZONE="America/New_York"
UTC=true
ARC=false
In order to get the particular zone you wish to use you must associate ZONE with a file located in /usr/share/zoneinfo.
{{ZONE="America/New_York" Or you need to set the timezone to that of Los Angeles }}ZONE="America/Los_Angeles"
Save the file /etc/sysconfig/clock and on next reboot the system will be set to the defined timezone.
To set timezone on the host to reflect the changed timezone we need to symlink the zoneinfo file to /etc/localtime.
If you are setting your timezone to "America/Los_Angeles" link the following file to /etc/localtime 
#ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Now by typing the date command to display the time you should see if reflect the newly linked timezone
# date

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results