My system clocks are 3 hours 41 minutes off

,

I live in Samara timezone. It’s 22:08 (June 2th), but system time is 01:49 (July 3th). The “Clocks” app also shows this time.

Automatic timezone detection is turned on.

image

Edit: My local UNIX timestamp is also off

image

Screenshot from 2024-07-03 02-04-19

Edit 2:

user@fedora:~/Documents$ timedatectl status
               Local time: Ср 2024-07-03 02:13:40 +04
           Universal time: Вт 2024-07-02 22:13:40 UTC
                 RTC time: Вт 2024-07-02 22:35:27
                Time zone: Europe/Samara (+04, +0400)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot 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'.

Can you please check under Date & Time in Settings if you have the Time Zone manually selected?

Screenshot from 2024-07-02 15-36-22

Edit:
You posted your own solution

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'.

Yes, date and time are automatic, timezone is not automatic but the right timezone is selected (strange, I was sure I set it to automatic today… Or was it D&T?).

I however doubt it is the issue with TZ since my UNIX timestamp is also a few hours off (see Edit 1 to my post).

Is chrony running:

systemctl status chronyd.service

And:

journalctl -r -u chronyd.service

And

timedatectl

user@fedora:~/Documents$ timedatectl
               Local time: Ср 2024-07-03 02:49:09 +04
           Universal time: Вт 2024-07-02 22:49:09 UTC
                 RTC time: Вт 2024-07-02 23:14:10
                Time zone: Europe/Samara (+04, +0400)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot 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'.

I suggest following:

  • stop chronyd
  • set the date using the date command, for example sudo date -s 23:30
  • check the time is correct using the date command without arguments
  • start chronyd again

I ran sudo chronyc makestep, it seems to fix the problem for now.

Added time

Added ntp

Removed time

Also check the file /etc/adjtime. It should read

0.0 0 0.0
0
LOCAL

The numbers on the first and second lines are values added to or subtracted from the RTC time at boot time.

Is this on a laptop? From the logs it looks like it has troubles keeping time while suspended. You will probably need to change the makestep directive in /etc/chrony.conf to makestep 1.0 -1 to allow chronyd to make step corrections at any time, not just on start.

1 Like