4 ms·
I don't understand why do we need to have leap seconds. Even if time on Earth moves few minutes back, nobody would notice but astronomers. If time moves one hou
by vbezhenar 5y ago
I don't understand why do we need to have leap seconds. Even if time on Earth moves few minutes back, nobody would notice but astronomers. If time moves one hour back, just change your local zone offset, it happens all the time anyway, and that's about it.
It makes time calculations unreasonably complex without any benefit.
- FabHK 5y agoPick any two: 1. 86400 seconds a day 2. SI seconds 3. Noon synced up with the sun With UTC, we drop 1. With UT1, we drop 2. With TAI, we drop 3. Maybe we should have gone with TAI, or with UT1 - I think that's what Julia does, sort of: https://docs.julialang.org/en/v1/stdlib/Dates/#footnote-1 https://docs.julialang.org/en/v1/stdlib/Dates/#footnote-1
- mavhc 5y agoYep, just use TAI, you're already converting time to show it locally, so no problem also including leap seconds in that conversion
- bumbledraven 5y agoUsing TAI was also djb's solution to the problem. https://cr.yp.to/proto/utctai.html https://cr.yp.to/proto/utctai.html
- umvi 5y ago> I don't understand why do we need to have leap seconds. Even if time on Earth moves few minutes back, nobody would notice but astronomers. Right, and nobody's stopping you from using a sundial instead of a GPS watch if you don't care about high precision timekeeping. And if you do care about high precision timekeeping but hate leap seconds, you can use International Atomic Time (TAI). It all comes down to standardization. You might enjoy reading this: https://www.nist.gov/pml/time-and-frequency-division/nist-time-frequently-asked-questions-faq https://www.nist.gov/pml/time-and-frequency-division/nist-ti... Basically, standardization is hard. Not just for time, but any measurement (weight, length, etc). How do you absolutely guarantee that an airplane part made in France and the same airplane part made in Brazil are exactly the same dimensions/weight? You need standards. And those standards have slightly changed over time in an effort to achieve higher consistency/future-proofing. Time is especially difficult because gravity and speed affect time thanks to relativity. So how can you come up with a universally agreed upon definition of "one second"? The current best solution we have is to take a weighted average of 300+ atomic clocks. That's how we define TAI, and by extension, the second. However, people expect noon to be "the time when the sun is at its highest point in the sky". Leap seconds are used to make non-TAI time systems align exactly with the rotation of the earth. Without leap seconds, your local day will slowly drift until (millennia later) "noon" is happening in the middle of the night. And without leap years (which align the planet's orbit around the sun) your seasons will slowly drift for the same reason.
- tialaramex 5y ago> people expect noon to be "the time when the sun is at its highest point in the sky" A) No they don't, which makes sense because B) No it isn't And "millennia later" is really overstating how soon this would happen. If you did this, every few millennia if people are very angry about it they would merely need to change their time zone definition one step. Now, how many millennia does it take to change time zone definitions where you live? Oh that's right they weren't even invented a thousand years ago. So, firstly, people do not actually expect the sun to be "at the highest point in the sky" at 1200 local time, it hasn't been in their lived experience so why would they? They'd be surprised if it happened at 0800 or 1600, but precisely 1200 doesn't matter to them. Which is good because it isn't, it hardly could be. Nobody was proposing to eliminate leap years (although perhaps renaming them "leap days" and marking them as a holiday might be better) which are a whole different problem.
- fanf2 5y agoAnd leap seconds will stop working (as currently specified) in one or two thousand years when the earth is slow enough that we need ~12 each year. Time zone adjustments will continue to work much longer. https://www.ucolick.org/~sla/leapsecs/dutc.html https://www.ucolick.org/~sla/leapsecs/dutc.html There is a confounding issue, though: the continual messing around with daylight saving means that time zones have to be relatively easy to alter. But if (as seems likely) daylight saving is abolished, this flexibility will ossify, so it might not be so easy to use in the distant future…
- deleted 5y ago[deleted]
- layer8 5y agoIf we don't apply corrections to UTC to match earth's rotation, their difference will increase roughly quadratically. Here is a table with estimates of when which delta (DUTC) will be reached: https://www.ucolick.org/~sla/leapsecs/dutc.html#dutctable https://www.ucolick.org/~sla/leapsecs/dutc.html#dutctable
- alanbernstein 5y ago> If time moves one hour back, just change your local zone offset ...so you want to replace leap seconds with leap hours?
- Dylan16807 5y agoCalculate how often leap hours will happen. So, yes. Time zone changes occasionally happen already.
- XorNot 5y agoYou're complaining about the difficulty of special-case code handling, and your solution is make an even specialer case which will happen so infrequently that no one will handle it until it does happen.
- School-Cotton 5y agoI’m fine with punting on problems that won’t have to be solved for literally thousands of years.
- Dylan16807 5y ago1. When we're talking about hundreds of years, even if it was that special it would cause less total disruption. 2. It's a time zone change, and those already happen more often than leap seconds.
- withinboredom 5y ago> It's a time zone change, and those already happen more often than leap seconds. I don't know about you, but I never change the time zone on my servers. Ever.
- Dylan16807 5y agoDoes the offset of your server's time zone also never change? Either way, these code paths get tested relatively often.