Linux System time Correction guide

Source: Internet
Author: User

Method One: Let the hardware clock time synchronize the system clock time
Yum Install Ntpdate-Yecho'*/5 * * * * /usr/sbin/ntpdate time.nist.gov >/dev/null 2>&1'>>/var/spool/cron/root//perform tasks every 5 minutes to the time server more than once. Date0607020517.30 //< month >< date ><24 hour >< minutes >< year: 17 for 2017>.< sec >Hwclock--show//Viewing hardware timeHwclock--hctosys//allowing hardware time to synchronize the system time is more accurate because the system time synchronizes to the time server for the time. Vi/etc/sysconfig/clock//Fix Time zone

Zone="Asia/shanghai"
Or

The following sync to see if the time zone is Zone +8,
Date-r
If there is no + 8, adjust it as follows:
Tzselect
Select: 5 on behalf of the Asian->9 on behalf of China-and select 1 for Yes, adjust the time zone.


-rf/etc/-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime // link to Shanghai time zone file

---set --date="06/07/17 02:30:30"--

Linux System time Correction guide

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.