The system time and local time were not always correct when the machine was debugged, and the beginning thought it was time error,
Then find the use of Ntpdate-u 211.115.194.21 synchronized network time, but still wrong, compared with the local only found that there is always a difference of eight hours,
Find it on the Internet again, it's a time zone problem, the machine uses UTC and needs to be corrected to GMT. Found on the Internet, are copied and pasted, the content is a bit incomplete, after the change is recorded here.
Using date viewing time, you can see that the suffix takes UTC time, such as this: Tue 08:30:10 UTC 2017
Copy GMT time zone data to localtime file
Cp/usr/share/zoneinfo/gmt/etc/localtime
Then set the time zone Ln-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime #linux的时区设置为上海时区
Then again synchronization network time: Ntpdate-u 211.115.194.21
Then set the hardware time:./usr/sbin/hwclock--SYSTOHC
It's normal for me to get to this step on my machine ...