Chrony doesn't update my system time by default

On my new laptop I've installed Fedora 37, just like I had used Fedora on my other machines. The new thing is Chrony which replaces NTP. And it doesn't really work for laptops by default.

The idea with NTP is that your computer can ask other computers for the time and then locally set the time. This works great. Chrony strives to replace NTP and make it even more accurate. But somehow the system time of my laptop was always incorrect and a few hours early, which was really annoying.

I noticed that I wanted to go to bed, but it was over an hour early. Then I compared with my watch, and the time was clearly off. I dug into it, found that Chrony was configured and running. So I just restarted it, the time came back to normal. Strange.

Eventually I found the answer: Depending on the configuration, Chrony only adjust the time gradually. The idea is that if you have a server running and it is a little ahead, time is slowed down. This prevents a backward jump in time. Backward jumps are dangerous for build systems or other things because you can break causality with that. Chrony allows gradual adjustments.

The problem is, however, that I regularly suspend my laptop. When it wakes up, it should make a forward jump. But it did not. Instead, I guess, it would have sped up time a bit. The configuration would only allow it to speed up very little, and therefore it was constantly behind. It basically left when I went to bed the day before.

The solution is to allow the system to always step the clock once the difference exceeds a full second in the /etc/chrony.conf:

makestep 1 -1

And now the time updates work perfectly and my system time is like it should be.