今天排查问题的时候查看日志,发现时间不对
[[email protected] bin]# date
Sat Aug 20 05:03:38 EDT 2022
[[email protected] bin]# ntpdate ntp1.aliyun.com
同步一次时间之后再查还是不对
[[email protected] bin]# hwclock --show
Sat 20 Aug 2022 05:04:25 AM EDT -0.178848 seconds
[[email protected] bin]# date
Sat Aug 20 05:05:53 EDT 2022
查看时区,发现是时区设置错误,设置成了纽约时区,应该是装系统的时候忘了设置导致的。
[[email protected] ~]# timedatectl Local time: Sat 2022-08-20 05:13:05 EDT Universal time: Sat 2022-08-20 09:13:05 UTC RTC time: Sat 2022-08-20 09:13:05 Time zone: America/New_York (EDT, -0400) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: yes Last DST change: DST began at Sun 2022-03-13 01:59:59 EST Sun 2022-03-13 03:00:00 EDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2022-11-06 01:59:59 EDT Sun 2022-11-06 01:00:00 EST
重新设置是时区,再查时间OK
[[email protected] ~]# timedatectl set-timezone Asia/Shanghai [[email protected] ~]# date Sat Aug 20 17:15:32 CST 2022