Re:Ask HN: How is it that programmers can simply ignore leap...
by vba616 on Saturday January 15, 2022 @01:09AM
(#29944019)
>When a leap second occurs, NTP servers will smear that second over 12 hours or so
Since when? I mean that literally, I only heard of this concept recently and didn't think it was a general standard, yet.
Re:Ask HN: How is it that programmers can simply ignore leap...
by sla29970 on Saturday January 15, 2022 @01:30AM
(#29944124)
"My system clock is wrong, what action shall I take to correct it?"
Common answers to that question are "step" or "smear". The notion that the clock could be wrong is not addressed in the design of most systems, and "smear" is widely accepted as the least harmful fix.
Re:Ask HN: How is it that programmers can simply ignore leap...
by vba616 on Saturday January 15, 2022 @03:00AM
(#29944640)
Yes, I'm wondering when/how "smearing" became widely accepted, since the Wikipedia page on leap seconds only says that there is a proprietary method that Google uses, and another that Amazon uses.
"UTC-SLS was proposed as a version of UTC with linear leap smearing, but it never became standard"
Re:Ask HN: How is it that programmers can simply ignore leap...
by sla29970 on Saturday January 15, 2022 @04:02PM
(#29950225)
Lack of agreement; "smearing" is completely normal for answering "What time is it?", and completely wrong for applications requiring precise time.
Re:Ask HN: How is it that programmers can simply ignore leap...
by omegalulw on Saturday January 15, 2022 @03:05PM
(#29949706)
Why can't we just switch to TAI for computers and anything electronic everywhere and just use UTC for user visible timestamps?
Re:Ask HN: How is it that programmers can simply ignore leap...
by staticautomatic on Friday January 14, 2022 @10:44PM
(#29943336)
How can air-gapped computers keep time well?
Re:Ask HN: How is it that programmers can simply ignore leap...
by zozbot234 on Friday January 14, 2022 @10:57PM
(#29943394)
Use a GPS receiver, that will only get time reference and location from the GPS satellites, and not transmit anything. So you're still airgapped - see https://gpsd.gitlab.io/gpsd/gpsd-time-service-howto.html for reference.
Re:Ask HN: How is it that programmers can simply ignore leap...
by onionisafruit on Saturday January 15, 2022 @12:30AM
(#29943838)
Is it really still airgapped if it accepts input from an outside system?
Re:Ask HN: How is it that programmers can simply ignore leap...
by fprotthetarball on Saturday January 15, 2022 @02:07AM
(#29944347)
No data leaves the computer over GPS and the computer controls how it processes the data. It's no worse than a keyboard.
Re:Ask HN: How is it that programmers can simply ignore leap...
by matthewmacleod on Saturday January 15, 2022 @06:22AM
(#29945575)
It's not really an air-gapped system if it accepts unauthenticated external radio signals and changes state in response, which is what would be happening in that case.
You don't need much imagination to think of various attacks that a spoofed GPS signal could open up, if you were able to cause a system to have an incorrect time.
The big reason to isolate this is because leap seconds aren't totally determinate. We can predict them to some degree, but ultimately rely on measurement. Unlike something like leap days, you cannot safely code a system that accounts for future leap seconds. Leap days follow a well-defined formula, leap seconds do not.
For time sensitive applications like navigational computers, TAI is used. TAI is currently 37 seconds off from UTC. TAI is associated with the SI Second unit. While originally derived from the solar day, it is now based on the vibrational frequency of a caesium atom.
For a more detailed explanation see http://mperdikeas.github.io/utc-vs-ut1-time.html for a good summary.
For an overview on how Google handles the smear see https://developers.google.com/time/smear