Ubuntu ways to modify time zones and times
1, first to see the time zone
[Email protected]:~# date-rwed, Sep 2017 21:04:21-0400
If you want to modify the time zone, perform Tzselect
2. Select Region: Asia
[Email protected]:~# tzselectplease Identify a location so that time zone rules can be set correctly. Please select a continent, Ocean, "coord", or "TZ". 1) Africa 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean10) c Oord-i want to use geographical coordinates.11) Tz-i want to specify the time zone using the Posix TZ format.#? 4
3. Select Country: China
PLEASE SELECT A COUNTRY WHOSE CLOCKS AGREE WITH YOURS. 1) AFGHANISTAN           18) Israel 35) Palestine 2) ARMENIA               19) JAPAN                 36)  PHILIPPINES 3) Azerbaijan  20) Jordan 37) qatar 4) Bahrain      21) Kazakhstan 38) russia 5) bangladesh 22) Korea (north) 39 saudi arabia 6) BHUTAN                23) Korea (south) 40) singapore 7) BRUNEI                24) kuwait 41 ) sri lanka 8) Cambodia    25) Kyrgyzstan  SYRIA 9) China 26) Laos 43) taiwan10) Cyprus      27) Lebanon 44) tajikistan11) East Timor       28) Macau 45) thailand12) Georgia 29) Malaysia 46) turkmenistan13) Hong Kong            30) Mongolia 47)  UNITED ARAB EMIRATES14) India 31) Myanmar (Burma) 48) uzbekistan15) Indonesia         32) Nepal 49)  VIETNAM16) Iran               33) Oman                 50) YEMEN17) Iraq    34) pakistan#? 9
4. Choose your time zone: GMT
Please select one of the following time zone Regions.1) Beijing Time2) Xinjiang time#? 1
5. Confirm the verification:
Please select one of the following time zone regions.1) Beijing  TIME2) xinjiang time#? 1the following information has been given : china beijing timetherefore tz= ' Asia/shanghai ' will be used. local time is now: thu sep 14 09:14:41 Cst 2017.universal time is now: thu sep 14 01:14:41 utc 2017.is the above information ok?1) yes2) no#? yesplease enter a number in range.#? 1you can make this change permanent for yourself by appending the line tz= ' Asia/shanghai '; export tzto 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 youcan use the /usr/bin/tzselect command in shell Scripts:asia/shanghai
6. copy files to/etc directory
sudo cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
7. Update Time
sudo ntpdate time.windows.com
Change Time Reference:
Modification time
sudo date-s mm/dd/yy//modification date sudo date-s hh:mm:ss//Modified Time
Time to modify the hardware CMOS after the modification time
sudo hwclock--SYSTOHC//Very important, if there is no such a step, the latter time is still not allowed
This article is from the "Cvsblog" blog, make sure to keep this source http://cuis1.blog.51cto.com/8805022/1965119
Ubuntu ways to modify time zones and times