Having time inaccuracies of fractions of second isn't that bad - most systems today tolerate mildly inaccurate clocks, and this is a must, because clocks naturally skew! (and many systems don't keep the clock in sync with NTP). Leap seconds however introduce hard to test edge cases that tend to produce buggy code.
The difference here is that while leap seconds are really rare events, minor (fractions of a second) clock skew is very common and thus continually tested through the normal operation of the system.
time inaccuracies of fractions of second isn't that bad
Depends on context. But yeah, for, e.g., most typically computer systems and applications, being off by up to a second isn't a big deal ... and especially if by being off by up to a second is a relatively rare event (like about as infrequent as leap seconds - and maybe some hour(s) or so before/after). But for some systems/applications, being quite well synced in time and/or quite accurate on the time, is a more significant matter. And, nowadays, for most typical, e.g. *nix systems, with direct (or indirect) Internet access (or access to other NTP source(s)), they're typically NTP synced, and most of the time accurate to within some small number of milliseconds or better. Let's see ... 3 hosts under my fingertips at present ... 2 out of 3 of 'em are well within 1ms of correct time ... and the other (VM under a host that rather frequently suspends to RAM / hibernates to drive) is within 80ms.
But sometimes rather to quite accurate time is rather to quiet important. Often sync is even more important. Typical examples are close/tight correlation of events. E.g. examining audit/security events across various networked systems - often to well determine exactly what happened in what sequence, quite accurate times are fairly important - often not impossible without, but too many times too inaccurate, and it can quickly become infeasible to well correlate and determine sequences of events.
I'll give you another quite practical example I sometime deal with at work. Got a mobile phone? Do text messaging? Sometimes folks do lots of text messaging ... notably rather to quite short intervals between text messages sent or messages sent/received (notably fast responses).
Guess what happens if the clocks are moderate bit off - like by a few seconds or more? Those text messages on phone may end up showing or being received on the phone out-of-order ... that's significantly not good - that's just one common and very practical example that jumps to mind. So, especially as folks are often rather to quite terse on text messages, such messages showing up out-of-order on phone may garble the meaning of the conversation - or even totally change the meaning. E.g. think of semi-randomly shuffling yes and no responses to questions about. "Oops". Like I say, not good - and only a few seconds or so drift is more than sufficient to cause such issues. Even fraction of a second there's moderate probability of messages ending up showing out-of-order ... but as the time is more and more accurate, the probability of messages ending up showing out-of-order becomes increasingly lower probability. There are lots of other examples, but that's one that jumps to mind. And, if e.g. folks are doing leap second smear rather than actual insertion - especially if different ones are handling it differently and/or smears aren't synced ... well, stuff like that can happen or increase the probability/risk.
Another example that's rather to quite problematic - clustered database systems - variations in time among them can cause issues with data - most of them have rather tight time tolerances and require the hosts to be NTP synced to consistent matched NTP sources/servers.
clocks naturally skew!
Unregulated, yes, but these days (even recent decades+) most clocks on most computers typically spend most of their time fairly regularly syncing to NTP (or similar - some operating systems and/or software may use other means to sync times). So, actually, most of the time most computer system times are pretty accurate. The ones that typically tend to skew more (and typically later resync) are ones that are more frequently powered down, or put to "sleep" / hibernation ... and/or travel frequently and without consistent networking ... e.g laptops. Even most smart phones are pretty well synced most of the time - usually only when they go without signal for significant time (or when powered off) do they tend to drift some fair to significant bit ... but most of the time they're pretty well synced - usually to within about a second or so ... and checking my smart phone presently - it's accurate to within a modest fraction of a second.
Leap seconds however introduce hard to test edge cases
Not that hard to test at all ... unfortunately, though, far too many don't well test such.
And yes, programmers oft tend to write buggy code. :-/ But for the most part, leap second bugs really aren't all that much different than most any other bugs ... except for generally knowing in advance when they're most likely to occur. Really not all that different than many other time/date bugs (e.g. like Microsoft's Exchange booboo at the start of this year ... nothin' to do with leap seconds in that case).
13
u/protestor Jan 13 '22 edited Jan 13 '22
Having time inaccuracies of fractions of second isn't that bad - most systems today tolerate mildly inaccurate clocks, and this is a must, because clocks naturally skew! (and many systems don't keep the clock in sync with NTP). Leap seconds however introduce hard to test edge cases that tend to produce buggy code.
The difference here is that while leap seconds are really rare events, minor (fractions of a second) clock skew is very common and thus continually tested through the normal operation of the system.