After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone ),
After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone ),
After installing the CentOS system, many netizens find that the time is 8 hours different from the current time. This is because the time zone We selected when installing the system is Shanghai, and the default bios time of CentOS is utc, so the time difference is 8 hours. At this time, the bios time is inconsistent with the system time. One represents utc time, and the other represents cst (+ 8 time zone), that is, Shanghai time.
The following describes how to solve the synchronization time:
1. vi/etc/sysconfig/clock # edit the file
ZONE = "Asia/Shanghai"
UTC = false # Set to false, and the hardware clock is not consistent with utc time
ARC = false
2. ln-sf/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # Set the linux time zone to Shanghai.
3. ntpdate 192.43.244.18 # time point. You must first install the ntp server yum install ntp
4./sbin/hwclock -- systohc # Set the hardware time to be consistent with the system time and calibrate
At this point, the linux system time and the computer hardware time are both cst time and Shanghai time zone.