- Generic procedure to change timezone under Linux
Cd to /etc, run:
# cd /etc
Create a symlink to file localtime:
# ln -sf /usr/share/zoneinfo/EST localtime
OR some distro use /usr/share/zoneinfo/dirname/zonefile format (Red hat and friends):
# ln -sf /usr/share/zoneinfo/EST localtime
OR if you want to set up it to IST (Asia/Calcutta):
# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
Please note that in above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory. If you want to set some other timezone you can pass the Following command tzselect then select the continent then Location. You can edit the File Accordingly to the continent & Location choosen for example Amsterdam
If you want to set up it to CET(Europe/Amsterdam):
# ln -sf /usr/share/zoneinfo/Europe/Amsterdam localtime
- How do I verify new settings?
$ date
Output:
Tue Aug 27 14:46:08 EST 2006