![Centos 7 - 我无法修复日期时间](https://linux22.com/image/776213/Centos%207%20-%20%E6%88%91%E6%97%A0%E6%B3%95%E4%BF%AE%E5%A4%8D%E6%97%A5%E6%9C%9F%E6%97%B6%E9%97%B4.png)
这不是虚拟机。物理服务器。Centos 7
我尝试用以下方法修复时间:
date -s "04/03/2022 01:06:31"
或者
timedatectl set-time 01:06:31
但这是不可能的,它总是比当地时间多显示 8 个小时:
[root@localhost ~]# timedatectl status
Local time: Sun 2022-04-03 09:06:31 CEST
Universal time: Sun 2022-04-03 07:06:31 UTC
RTC time: Sun 2022-04-03 07:06:31
Time zone: Europe/Madrid (CEST, +0200)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2022-03-27 01:59:59 CET
Sun 2022-03-27 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2022-10-30 02:59:59 CEST
Sun 2022-10-30 02:00:00 CET
[root@localhost ~]# date
date
Sun Apr 3 09:06:32 CEST 2022
时区Europe/Madrid
正确
有什么办法可以修复它吗?
新测试:
[root@localhost ~]# hwclock
Mon 04 Apr 2022 01:31:35 PM CEST -0.250859 seconds
[root@localhost ~]# date
Mon Apr 4 20:31:30 CEST 2022
[root@localhost ~]# timedatectl
Local time: Mon 2022-04-04 20:31:34 CEST
Universal time: Mon 2022-04-04 18:31:34 UTC
RTC time: Mon 2022-04-04 11:31:43
Time zone: Europe/Madrid (CEST, +0200)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2022-03-27 01:59:59 CET
Sun 2022-03-27 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2022-10-30 02:59:59 CEST
Sun 2022-10-30 02:00:00 CET
[root@localhost ~]#
hwclock 上的时间正确,但是 timedatectl 和 date 上的时间错误 :(
时区正确
任何想法?