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