Linux modified local time (CentOS for example)

Source: Internet
Author: User
Tags local time

1. Tzselect

[[email protected] etc]# tzselect---Select the time zone command please identify a location so it time zone rules can beSetcorrectly. 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 time zoneusingThe Posix TZ format.#?5 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 pleaseSelectOne of the following time zone regions.1) Beijing Time2) Xinjiang Timeplease Enter a numberinchrange.#?1The following information has been Given:china Beijing Timetherefore TZ='Asia/shanghai'would be used. Local Time isNow:thu May4  -: the:GenevaCst .. Universal Time isNow:thu May4  the: the:GenevaUtc .. is the above information OK?1) Yes2) No

To reload the local time

Date View local time

  

2. Modify the local localtime file

  

View the/usr/share/zoneinfo folder and discover all the regional time files

So

rm-rf/etc/-s/usr/share/zoneinfo/asia/shanghai  /etc/lcoaltime

Date view time changed to Shanghai East Zone eight time

3. Ntpdate & NTPD

Yum-y Install Ntpdate NTP

Synchronous Online Network S

Ntpdate xxxx

  

Crontab: Not 10 minutes to adjust the time;

* * * * * * * ntpdate time.nist.gov   #域名或IP

Time server:

Time.nist.gov
Time.nuri.net
0.asia.pool.ntp.org
1.asia.pool.ntp.org
2.asia.pool.ntp.org
3.asia.pool.ntp.org

Level of Time server list: Http://support.ntp.org/bin/view/Servers/StratumOneTimeServers

Second-level time server list: Http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers

Linux modified local time (CentOS for example)

Related Article

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.