[lug] Setting time zone
Gary Hodges
Gary.Hodges at noaa.gov
Tue Aug 5 09:48:29 MDT 2008
On an Ubuntu system I'd like to set the time zone on a computer to CST.
When I run "sudo tzselect" and go through the steps I get:
------------------------
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 11
Please enter the desired value of the TZ environment variable.
For example, GST-10 is a zone named GST that is 10 hours ahead (east) of
UTC.
CST+6
The following information has been given:
TZ='CST+6'
Therefore TZ='CST+6' will be used.
Local time is now: Tue Aug 5 09:42:30 CST 2008.
Universal Time is now: Tue Aug 5 15:42:30 UTC 2008.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='CST+6'; export TZ
to the file '.profile' in your home directory; then log out and log in
again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
CST+6
------------------------
But I want to set the time zone globally, not just for a particular user.
Gary
More information about the LUG
mailing list