The system time on the server now is:
[~] #date
Thu Jul 11:44:01 CST 2015
Now the hardware time is:
[~] #clock
Thu 11:44:22 AM CST-0.031420 seconds
。
The specific steps are:
[Root@localhost ~]# Tzselect
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
Iran) Oman Yemen
() Iraq) Pakistan
#? 9
Please select one of the following time zone regions.
1) Beijing time
2) Xinjiang time
#? 1
The following information has been given:
China
Beijing time
Therefore tz= ' Asia/shanghai ' would be used.
Local time is Now:thu Jul 03:47:07 GMT 2015.
Universal time is Now:thu Jul 11:47:07 UTC 2015.
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
[Root@localhost ~]#
Cat/etc/profile
tz= "Asia/shanghai"
Export TZ
Vim/etc/localtime
Change to CST China standard Time
CentOS 6.5 64-bit system time setting