You are not logged in.
Hi,
This is a laptop I have had for a couple of years. it dual boots with windows, and I never had this problem before.
For perspective, it currently says as time 10:11am, which is completely wrong because I am at 09:37am. No idea where it is getting those wrong values from. Prior to this weekend I had it automated, set to UTC (same in Windows, also UTC and Automated) and it all seemed to work fine. For some reason windows cannot sync now (but that's another problem).
I've tried setting it manually, but then once I boot back from windows, it is wrong. I tried to do it automatically, but as you can see the time is all wrong.
[juanma@latitude ~]$ timedatectl
Local time: Thu 2024-04-04 10:12:53 BST
Universal time: Thu 2024-04-04 09:12:53 UTC
RTC time: Thu 2024-04-04 08:39:14
Time zone: Europe/London (BST, +0100)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
The following time seems to be OK:
[root@latitude juanma]# hwclock --show
2024-04-04 09:40:33.004433+01:00
But after executing the following, it fetches the wrong time
[root@latitude juanma]# hwclock --show
2024-04-04 09:40:33.004433+01:00
[root@latitude juanma]# hwclock --systohc
[root@latitude juanma]# hwclock --show
2024-04-04 10:14:57.654148+01:00
Trying to use a suggested command from ntpd, returns an error
[root@latitude juanma]# sudo ntpd -qg
ntpd: invalid option -- 'q'
usage: ntpd [-dnv] [-f file] [-p file]
Using Gnome I disabled the automatic date and time, and I set the correct one:
[root@latitude juanma]# hwclock --show
2024-04-04 10:18:08.726725+01:00
[root@latitude juanma]# timedatectl set-time "2024-04-04 09:45:00"
[root@latitude juanma]# hwclock --show
2024-04-04 09:45:02.345580+01:00
[root@latitude juanma]# timedatectl
Local time: Thu 2024-04-04 09:45:06 BST
Universal time: Thu 2024-04-04 08:45:06 UTC
RTC time: Thu 2024-04-04 08:45:07
Time zone: Europe/London (BST, +0100)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
You can see that the local time is OK (as I just set it) but the UTC and RTC time are 1 hour before.
But when when I activated the automated date and time, it gets it wrong again
[root@latitude juanma]# timedatectl
Local time: Thu 2024-04-04 10:17:42 BST
Universal time: Thu 2024-04-04 09:17:42 UTC
RTC time: Thu 2024-04-04 08:45:20
Time zone: Europe/London (BST, +0100)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
I have no idea where it is fetching those times from.
Last edited by joanmanel (2024-04-04 08:47:28)
Offline
Please post the output of
$ ntpq --peers
$ systemctl status systemd-timesyncd.service
$ systemctl status ntpd.service
[
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
https://fishilico.github.io/generic-con … clock.html
The problem is windows - like pretty much always when dual booting with Linux.
Why: Linux expects the bios hardware clock to be set to UTC and derives the local time from it.
Windows in conflict expect the bios hardware clock to be the local time and uses it directly.
Hence: When you sync Windows it will set the hardware clock to your local time (UTC +0 (+1 summer offset)). When you sync Linux (which you should by enable ntp sync) it will sync the hwclock to UTC and derives the systemtime +1 from it.
Offline
https://fishilico.github.io/generic-con … clock.html
The problem is windows - like pretty much always when dual booting with Linux.
Why: Linux expects the bios hardware clock to be set to UTC and derives the local time from it.
Windows in conflict expect the bios hardware clock to be the local time and uses it directly.Hence: When you sync Windows it will set the hardware clock to your local time (UTC +0 (+1 summer offset)). When you sync Linux (which you should by enable ntp sync) it will sync the hwclock to UTC and derives the systemtime +1 from it.
This has already been done long time ago. It is also in the ARch Wiki
Offline
FWIW sometimes Windows updates can flip random settings, it wouldn't hurt to double check. Also and -- because we've definitely seen this get reset before -- double check https://wiki.archlinux.org/title/Dual_b … ibernation (again)
Offline
Am I missing something here: as much as I enjoy blaming MS for everything, that just doesn't seem relevant here. First, the error in the time is not one of being in a different TZ: it's not off by a fixed number of hours, but by roughly 34.5 minutes. That's not a result of some other system resetting to a different TZ.
Additionally, the hardware clock was reportedly correct while the linux system clock was wrong (off by the roughly 34 minutes); and setting systohc made the hardware clock then wrong: Windows was never running during that process, right?
So as common of an explanation windows timezone settings can be at baseline for *other* clock errors in dual boot systems, that really doesn't fit these symptoms at all.
My suspicion would be a failing ntpd service or similar as Lone_Wolf's seems to be. This is supported by the fact that the OP seems to have openntpd installed, yet is expecting to use flags for a different ntpd implementation: joanmanel, can you clarify this, which ntpd implementation are you using and how did you configure it? Or did someone else set this up for you?
Last edited by Trilby (2024-04-04 13:07:54)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
fixed number of hours, but by roughly 34.5 minutes. That's not a result of some other system resetting to a different TZ
Just for the records (and to subscribe), https://www.worldtimeserver.com/learn/u … ime-zones/
Not an issue here - though couple of years ago one might have worried that this is "Boris Standard Time" (to accustom to him being always too late)
But yes, post the output Lone_Wolf asked for.
Offline