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