Should leap seconds matter then? As long as you are synchronizing with the same source of truth as the financial institution's back-end, both clocks should tell the same time.
Ask HN: How is it that programmers can simply ignore leap seconds?
11–20 of 39 posts
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#12> If I create a date object of 1970-01-01T00:00:00 and repeatedly add 86400 seconds, should I not end up with a date/time that is no longer midnight? Of course and that’s why you shouldn’t do that. I don’t know about other languages, but if you want to advance a certain number of days, you don’t just add seconds. Any code review would pick that apart. You add (or subtract) date components, meaning you specify a day,…
Because it does always remain midnight, it shows we are all ignoring leap seconds.
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#13> including applications that require a certain level of accuracy (e.g. processing pricing feeds from financial institutions) Should leap seconds matter then? As long as you are synchronizing with the same source of truth as the financial institution's back-end, both clocks should tell the same time.
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#14Computers usually report time in UTC but don't actually have leap seconds. Most computers are pretty bad at keeping time, and regularly sync to NTP servers for the current time. NTP servers generally have better time keeping hardware (or sync with better sources). When a leap second occurs, NTP servers will smear that second over 12 hours or so. Different NPT servers have different smear standards. During that smear,…
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#15Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#16Computers usually report time in UTC but don't actually have leap seconds. Most computers are pretty bad at keeping time, and regularly sync to NTP servers for the current time. NTP servers generally have better time keeping hardware (or sync with better sources). When a leap second occurs, NTP servers will smear that second over 12 hours or so. Different NPT servers have different smear standards. During that smear,…
How can air-gapped computers keep time well?
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#17Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#18> If I create a date object of 1970-01-01T00:00:00 and repeatedly add 86400 seconds, should I not end up with a date/time that is no longer midnight? Of course and that’s why you shouldn’t do that. I don’t know about other languages, but if you want to advance a certain number of days, you don’t just add seconds. Any code review would pick that apart. You add (or subtract) date components, meaning you specify a day,…
Other programming languages apart from what? You never specified which language you're talking about.
Re: Ask HN: How is it that programmers can simply ignore leap seconds?
#19Earlier quoted context omitted.
How can air-gapped computers keep time well?
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 seconds?
#20Computers usually report time in UTC but don't actually have leap seconds. Most computers are pretty bad at keeping time, and regularly sync to NTP servers for the current time. NTP servers generally have better time keeping hardware (or sync with better sources). When a leap second occurs, NTP servers will smear that second over 12 hours or so. Different NPT servers have different smear standards. During that smear,…
Since when? I mean that literally, I only heard of this concept recently and didn't think it was a general standard, yet.