Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

16
  • I know the timestamps are usually monotonically increasing, but the question is about the possible exceptions: NTP adjustments and leap seconds. Commented Dec 17, 2024 at 21:06
  • and I answered that: still monotonous; leap seconds don't affect how many seconds have happened since some point in time. They affect how that number of passed seconds is converted to a human-readable datetime. . (unless your NTP client does things it shouldn't do. Modern NTP clients by default are safe, in that they never set the clock back, they just "slow down" time, so that timestamps remain monotonous) Commented Dec 17, 2024 at 21:08
  • OK so that answers the part about NTP, what about leap seconds (if there are more)? Are timestamps in TAI rather than in Unix time? Commented Dec 17, 2024 at 21:09
  • 1
    But we're not talking about physics, we're talking about Unix timestamps... Sorry if I'm being obtuse but talking about time in physics doesn't resolve the question. Is the answer that timestamps in the filesystem are stored as a TAI offset rather than a UTC offset? Commented Dec 17, 2024 at 21:11
  • 1
    Sorry but your other answer clearly is wrong in light of the fact that Unix time jumps by 1 second during a leap second, as described on Wikipedia, and as I just confirmed by experiment. Commented Dec 17, 2024 at 21:36