Score:0

Centos 7 - I can't fix the datetime

cn flag

It's NOT a VM. Physical server. Centos 7

I have tried to fix the time with:

date -s "04/03/2022 01:06:31"

or

timedatectl set-time 01:06:31

But it is impossible, it shows always 8 hours more as local time:

[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

The timezone Europe/Madrid is OK

Any idea to fix it?


New tests:

[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 ~]#

The time is OK on hwclock but it's wrong on timedatectl and date :(

The timezone is OK

Any idea?

in flag
Is this a VM? If yes, what's the time and timezone configuration of the host?
djdomi avatar
za flag
i agree with gerald, mostly like is the host the issue specifically if its a Linux box
cn flag
It's not a VM, it is a server, that machine: https://www.pciex.net/products/tbs-moi-pro-amd-iptv-streaming-server?lang=es&variant=6122883317792
cn flag
I have changed the time on the BIOS. The time had 6 hours more... i set the Spanish time, but now in centos has 2 hours more, 15:20 instead of 13:20 :( The timezona is OK in timedatectl but the local time is wrong and the date command also has a wrong date
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.