Ubuntu uses Tzselect to modify time zones

Source: Internet
Author: User
Tags time zones

1, command line run

sudo tzselect

2. Select the Continent (Asian Asia region)

[Email protected]:~$sudoTzselect[sudo] Password forWaichung:please Identify a location TimeZone rules can be set correctly. pleaseSelecta continent or ocean.1) Africa2) Americas3) Antarctica4) Arctic Ocean5) Asia6) Atlantic Ocean7) Australia8) Europe9) Indian OceanTen) Pacific Ocean One) None-i want to specify the Timezone using the Posix TZ format.#?5

3, select the country (here to choose China)

PleaseSelecta country.1) Afghanistan -) Israel *) Palestine2) Armenia +) Japan $) Philippines3) Azerbaijan -) JordanPanax Notoginseng) Qatar4) Bahrain +) Kazakhstan -) Russia5) Bangladesh A) Korea (north) the) Saudi Arabia6) Bhutan at) Korea (south) +) Singapore7) Brunei -) Kuwait A) Sri Lanka8) Cambodia -) Kyrgyzstan the) Syria9) China -) Laos +) TaiwanTen) Cyprus -) Lebanon -) Tajikistan One) East Timor -) Macau $) Thailand A) Georgia in) Malaysia $) Turkmenistan -) Hong Kong -) Mongolia -) Arab Emirates -) India to) Myanmar (Burma) -) Uzbekistan the) Indonesia +) Nepal the) Vietnam -) Iran -) Oman -) Yemen -) Iraq the) pakistan#?9

4. Choose Beijing-GMT

Select  Time zone regions. 1 ) Beijingtime2) Xinjiang time#1

5. Select Yes

The following information has been Given:china Beijing Timetherefore TZ='Asia/shanghai'would be used. Local TimeIs Now:thu -  the: +: -Cst .. Universal Time is Now:thu -  -: +: -Utc .. is the above information OK?1) Yes2) no#?1You can MakeThis change permanent foryourself by appending the line TZ='Asia/shanghai'; export Tzto thefile '. profile' inchyour home directory; ThenLog out and loginchagain. Here is the TZ value again, this TimeOn, output So, youcan Use the/usr/bin/tzselect commandinchShell Scripts:asia/shanghai

Method 1: Add a line to the. profile file in the user directory, and then source ~/.profile to make it effective

Export tz='asia/shanghai'

Mode 2: Copy the appropriate time zone file into/etc directory

sudo CP /usr/share/zoneinfo/asia/shanghai  /etc/localtime

6. Synchronization Time

sudo ntpdate pool.ntp.org  - ntpdate[:26982time 193.228.  143.14 Offset-0.154279 sec

Ubuntu uses Tzselect to modify time zones

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.