1.查看当前的系统时间, 发现当前时间与标准时间不一致
[root@hadoop3 ~]# date 2020年 12月 16日 星期三 22:33:30 CST [root@hadoop3 ~]#
2. 查看当前时区
[root@hadoop3 ~]# timedatectl status Local time: 三 2020-12-16 22:30:43 CST Universal time: 三 2020-12-16 14:30:43 UTC RTC time: 三 2020-12-16 22:30:43 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: yes NTP synchronized: yes RTC in local TZ: yes DST active: n/a Warning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
按照提示,修改rtc为utc
timedatectl set-local-rtc 0
3. 修改系统时间为正确的时间
date -s "2020-12-16 22:36:00"
4.如果时区不对,可以修改一下时区
timedatectl set-timezone Asia/Shanghai
5.重启 reboot