by panic · 7y ago · 0 comments
What is a realistic code example that might have problems with system clock updates?
But as long as you only need to track time for dealing with time intervals in an abstract fashion, you can get away with a nice continuous and monotonous scalar representation of timestamps.
There is plenty of code that has problems with time shifts, simply look at how often software crashes or misbehaves when there are leapseconds. Cloudflare experiences some of their code crashing because over a leap second, the time a request took suddenly became negative.