[email protected] ~]# date-r //view time zone
Mon, May 2014 10:18:46 +0000
[[email protected] ~]# tzselect//Set Change time zone
Please identify a, so, 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
Pacific Ocean
One) None-i want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.
1) Afghanistan Israel ) Palestine
2) Armenia Japan ) Philippines
3) Azerbaijan Jordan PNS) Qatar
4) Bahrain Kazakhstan ) Russia
5) Bangladesh Korea (north) , Saudi Arabia
6) Korea (south) Bhutan) Singapore
7) Brunei Kuwait ) Sri Lanka
8) Cambodia Kyrgyzstan ) Syria
9) Laos ) Taiwan
(Cyprus ) Lebanon ) Tajikistan
(one) East Timor) Macau Thailand
(Georgia ) Malaysia ) Turkmenistan
Hong Kong ) Mongolia Arab Emirates
India ) Myanmar (Burma) Uzbekistan
(Indonesia ) Nepal ) Vietnam
Oman Yemen
() Iraq ) Pakistan
#?
9
Please select one of the following time zone regions.
1) East China-beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) Central China-sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) Most of Tibet & Xinjiang
5) West Tibet & Xinjiang
#? 1
The following information has been given:
China
East China-beijing, Guangdong, Shanghai, etc.
Therefore tz= ' Asia/shanghai ' would be used.
Local time is now: Mon 18:19:27 CST 2014.
Universal time is now: Mon 10:19:27 UTC 2014.
is the above information OK?
1) Yes
2) No
#? 1
You can make the permanent to yourself by appending the line
tz= ' Asia/shanghai '; Export TZ
To the file '. Profiles ' in your home directory; Then logs out and logs in again.
Here is the TZ value again, this time
can use The/usr/bin/tzselect command in shell scripts:
Asia/shanghai
[[Email protected] ~]# Date
Mon May 10:19:45 UTC 2014
[[email protected] ~]# cp/usr/share/zoneinfo/asia/shanghai/etc/localtime//Replace system TimeZone file
Cp:overwrite '/etc/localtime '? Y
[Email protected] ~]# ntpdate time.windowscom
^[[a^c
[[email protected] ~]# ntpdate time.windows.com//Sync time
May 18:22:09 ntpdate[3400]: Adjust time server 65.55.56.206 offset-0.286027 sec
[[Email protected] ~]# Date
Mon May 18:22:10 CST 2014
References: http://blog.163.com/[email protected]/blog/static/17303755520118423614908/
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
CentOS in Set time zone