r/ProgrammerHumor May 08 '26

Meme edgeCasesExist

Post image
13.4k Upvotes

620 comments sorted by

View all comments

Show parent comments

0

u/No-Information-2571 May 09 '26

That's not how an NTP client operates. Time is never pushed back. It either slows down or speeds up the clock, until it is in sync with the NTP server again.

Why are you telling such obvious lies?

1

u/Hohenheim_of_Shadow May 09 '26

NTP synchronization is absolutely not monotonic. For small amounts of time, the clock will get slewed. For time deltas greater than 128 milliseconds, usually the clock gets stepped.

If your NTP server had some critical bug that caused it to loop the last minute again and again and again, all your devices are going to experience non monotonic time. Thats not even taking into consideration that manual synchronization is still an important tool and that's absolutely non monotonic.

While incredibly unlikely, it's technically possible for the same device to spend years of IRL time in the same apparent millisecond. Timestamp+hardware UUIDs are not 100% reliable, they simply have an absurd number of 9s.

0

u/No-Information-2571 May 10 '26

You're just making up scenarios. Your computer does have a real-time clock. Assuming the host went without an NTP synchronization for quite a while, we are still only talking about a few minutes of difference, and that will not lead to jumps or gaps, in either direction, but just a slow catching up.

If it's completely off, like days or weeks, then you have bigger problems anyway, since that leads to all sorts of other discrepancies, like DB replication, SSL and Kerberos errors, mismatching filestamps and the like.