Many may ask why the system time is eight hours faster than the current time because my CMOS time is the correct current time and the Beijing time zone is also set in Linux.
To solve this problem, first confirm whether the current time displayed by the current CMOS is the current time. If yes, your CMOS is not UTC time (that is, the CST local time) and you need to modify
In the/etc/sysconfig/clock file, change UTC = true to UTC = false (tell the Linux hardware to set the local time)
This is the reason that most of the time is 8 hours faster, because the default option for Linux installation is to use UTC time (CMOs on foreign computers may be set to UTC time ), the system mistakenly believes that your CMOS is UTC time, and you have selected the + 8 time zone, so Linux adds 8 hours of CMOS time as the system time.
Change Time Zone
Rm/etc/localtime
Ln-S/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
Read hardware time to System
Clock -- hctosys
Enter date to check whether the current CST time is used (CST indicates the local time, for example, Shanghai we set). If the time is incorrect, use the following method to modify the time:
Date-s 12:00:00
Write System Time to hardware
Clock -- systohc