For some odd reason, whenever I come home (16:00), the clock is set 8 hours ahead (0:00, date jumps to the next day). I have to set my clock manually every time or restart my computer to get the correct time again. There isn’t any weird time zone shenanigans, the automatic time zone is still correct, and I don’t live somewhere with daylight savings. What’s wrong with my clock???
I am using Fedora 43 KDE (note: the issue was a thing in 42 KDE as well, but not with 42 Workstation. Either this is a KDE bug or there is some weird conflict with the remnants of gnome stuff. Or maybe I borked something I shouldn’t have, idk)
edit: It is time zone shenanigans! My timezone is GMT+8. I have ran “timedatectl set-local-rtc 0” (the warning mentioned this when I ran “timedatectl status” as one person said to do) so let’s see if that fixes it
It is probably from time zone auto detection. I had this issue for a while but it went away eventually.
I think it is tied to WiFi based location detection
Have you tried not coming home from school?
During the holidays (i.e. I don’t go to school and back) the issue doesn’t pop up. Weird.
It sounds like your system clock may be the issue.You have a system clock inside your device. Linux usually uses the internet to set your clock but still refers to your system clock. If the internet provided time is too far off your system clock it may ignore it and display your system time.
KDE respects the NTP clock settings used by your linux system, while ironically Gnome does not and does its own thing directly with the time date control. This is probably why you’re now noticing a problem.
So either your system clock is supposed to be UTC and actually set to local time, or your system clock is correct but your timezone in linux is way off.
If you use
timedatectl statusin a terminal it’ll show your current local time, UTC and RTC time, as well as your timezone and whether the RTC is set to your local timezone or UTC. RTC is your hardware clock on your device.If “RTC is local tz” says no, then the value for RTC and UTC should be the same, as your hardware clock is set to be the UTC time. And if the UTC time is wrong then your system is uaing your hardware clock to incorrectly work out the UTC. UTC is the 0 timezone worldwide and has an absolute value - its the same for everyone and you can esily.find it with a search engine. If the displayed UTC is wrong on your system, then you’re out of sync with everyone.
So how to fix it if its wrong:
One way would be to tell your systen what the hardware clock should be and then set it correct. Use “timedatectl set-local-rtc 1” to make it set to be in your local time zone. Or if you want it to be UTC you can use
timedatectl set-local-rtc 0. You can use either but UTC is better.That should fix the issue as the network time will now come in correctly.
But if you wanted you can also manually set the local time and date with
timedatectl set-time hh:mm:ss. Once that is set then your RTC should also be changed and be back in sync depending on whether you set it up to be also local or UTC. When you set the local tine it will work out the UTC value based on your timezone. Note if the timezone is wrong it’ll still be wrong!If you can’t set the time because NTP (network time) is running, you could.leave it and the clock should now sort itself out. But if you want to force mannually set the time you can turn off NTP if you want: “timedatctl set-ntp false” You could leave it off and set the time manually using “timedatectl set-time hh:mm:ss”
If still getting NTP error messagss you could also disable the NTP system job temporarily:
systemctl disable --now chronyd. Turn it back on afterwards withsystemctl enable --now chronydFinally do make sure the timezone is correct. I know you say it is but timedatectl shows you what the system thinks it is, and if ita wrong then rtc/utc will still be wrong as the timezone is used to convert from local time to UTC. You can use timedatectl to change the timezone:
timedatectl set-timezone name.There are loads of valid timezones but only valid ones will work. Get your local timezones official name online or use
timedatectl list-timezonesto see all the options. You can filter uaing egrep etc.Hopefully that’ll fix the issue for you. You can also boot into your bios and manually set the hardware clock if needs be but linux still needs to know whether its supposed to be utc ir local time.
ok, got it. Thanks for the help! I will try that and see if it fixes the issue
In case you’re dual booting, it’s useful to also tell Windows that the system clock is UTC (if your Linux assumes this as well) like described here: https://ubuntuhandbook.org/index.php/2021/06/incorrect-time-windows-11-dual-boot-ubuntu/amp/
Sounds like this may be what’s going on.
Also, I believe this will work with 10 as well as 11.
It also worked back on Windows 7, perhaps even XP.
Do you happen to dual boot to Windows when at school, and live 8 timezones from Britain? Linux by default stores the hardware clock in UTC (and concerts to local time on the fly), while Windows stores the hardware clock in local time.
I am using GMT+8, interesting. I don’t dual boot windows at school, but I do have a dual boot with windows (but I rarely ever boot into windows…)
Make sure your bios datetime is set correctly to UTC as well. I think the timedatectl command might do that but might not be supported on all systems.
Hey, are you SURE this isn’t some timezone shenanigans, but at a lower level ? What is your timezone ? Are you dual booting to Windows sometimes ?
This could be an issue in how linux uses the hardware’s realtime clock (RTC).
Perhaps running
datetimectl statuscould provide some insight ?a warning shows up: 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’.
The warning disappears when I ran “timedatectl set-local-rtc 0”, will that fix the issue?
Yes it’ll fix the issue. That tells the system that your hardware clock should be in UTC. The time in your hardware clock will then be corrected from the internet as long as your time zone is correct.
I’m not an expert but I had a similar problem, except it was visible after each time I was rebooting to windows. Linux by default interprets the hardware clock as UTC, whereas windows interprets as local time. The warning you see is when your linux distro is instead configured to behave like windows does (local time).
In your case, it doesn’t seem as obvious what is the culprit (no windows to write the local time to the RTC) but perhaps the distro’s update changed that parameter somehow ?
Setting the flag to 0 shouldn’t cause more trouble than what you’ve already seen I think… So that’s worth trying out for a few days ;)
Time zone is GMT+8 (so it is a time zone thing!). Don’t really boot into windows much but it does exist. I think it might be my school’s network
As others have stated, it’s probably because you’re activating the network from an IP that is defined as being in another time zone in between two locations. This can sometimes happen with certain VPN configurations as well.
Here’s some info on debugging a bit further to help determine if this is the issue: https://www.linuxtechi.com/sync-time-in-linux-server-using-chrony/
And here’s how to force a time zone if needed: https://www.cyberciti.biz/faq/howto-linux-set-time-zone-per-user-basis/
Had this issue on a dual boot, could be caused by timezones.
Yes, afaIk, the solution is to set some parameter, like
HardwareClockIsUTC, in the Windows registry totrue.However, OP doesn’t mention running a dual boot machine.




