最近发现服务器的时钟时间跟世界时间不一致、
无论怎么修改ntp server都不行,data命令查看比世界时间快了20分钟左右,使用timedatctl命令查看,发现显示的是RTC时间
[root@storage2 ~]# date Wed May 11 10:11:02 UTC 2022 [root@storage2 ~]# timedatectl status Local time: Wed 2022-05-11 09:50:40 UTC Universal time: Wed 2022-05-11 09:50:40 UTC RTC time: Wed 2022-05-11 10:11:20 Time zone: UTC (UTC, +0000) NTP enabled: yes NTP synchronized: no RTC in local TZ: no DST active: n/a
需要hwclock重新同步才行
sudo hwclock --systohc
重新同步后查看
[root@storage2 ~]# dateWed May 1109:53:43 UTC 2022[root@storage2 ~]# timedatectl status Local time: Wed 2022-05-1109:53:50 UTC Universal time: Wed 2022-05-1109:53:50 UTC RTC time: Wed 2022-05-1109:53:50 Time zone: UTC (UTC, +0000) NTP enabled: yesNTP synchronized: no RTC in local TZ: no DST active: n/a