chrony[1] neatly solves these and a host of related issues by guaranteeing time increases monotonically on a given host, speeding up or slowing down the clock appropriately. It's a nicer alternative to ntpd. Also, AWS recommends it if you are using their Time Sync service (which is GPS-locked atomic clocks in every region with leap second smearing). [1]
> It's a nicer alternative to ntpd. define nicer?
Falsehoods programmers believe about Unix time
201–210 of 275 posts
Re: Falsehoods programmers believe about Unix time
#202Earlier quoted context omitted.
Well, the problem with this is that every simplistic view at time is... well... too simple. It's not that many people haven't tried, I especially like this article: https://qntm.org/abolish That being said, why your approach doesn't work is that there are several hard astronomical or cultural definitions that you'd throw off by playing with time. A day is defined as the rotation of the earth around its axis. A week i…
Your article is about time zones, not leap seconds? The US has put forth a proposal to abolish leap seconds. It is now supported by China, Australia, Japan, and South Korea. The ITU keeps punting on actually voting on it - it's now scheduled for 2023. https://en.wikipedia.org/wiki/Leap_second A day already drifts... every single day in fact. Why is 0.9 sec the magic threshold for maximum drift? Why can't it be 1 minu…
If the drift is about 0.5 second per year, about a minute of drift will have to be compensated on a century border.
Re: Falsehoods programmers believe about Unix time
#203Earlier quoted context omitted.
If we abolish leap seconds (and any other changes to UTC) and let the error accumulate until it hits 30 minutes then a 1-hour time zone change can adjust for it. Time zone changes happen at least semi-regularly so it wouldn't be monumental.
Wouldn’t that move the international date line?
Re: Falsehoods programmers believe about Unix time
#204I think we should have a scientific definition of time -- something that is highly static and precise (such as the time it takes for an atom to vibrant a number of times, or the time it takes light in a vacuum to travel a certain distance) and a cultural definition of time that is more loose than UTC (There is always the same number of seconds in a day, but maybe some days have shorter seconds than other days). Cultu…
Re: Falsehoods programmers believe about Unix time
#205Earlier quoted context omitted.
That's not anywhere close to "the best solution"
This discussion isn't going to be very meaningful unless you wanna tell us what 'best' means to you.
Re: Falsehoods programmers believe about Unix time
#206I deeply disagree with point 3. Unix Time actually never goes backward: it just stagnates during a leap second. The article uses fictional fractional second to argue the contrary but I don't think it makes much sense. Unix Time is represented an integer and has no concept of such a fractional unit. That's an important distinction because it means that if you use Unix Time as a timestamp you can actually be sure than…
[1] https://www.ucolick.org/~sla/leapsecs/timescales.html#UTC
Re: Falsehoods programmers believe about Unix time
#207I read articles like this and come to the conclusion that UTC is flawed, not Unix time. Leap seconds seem mostly useless. People seem to think they are important for astronomy, but for every astronomical calculation I have ever done, your first step is converting from UTC to TAI. Move any jumps in time to once a century (or millennium). Such jumps have occurred in the past (Julian to Gregorian) and are easy to handle…
Why don't you use TAI then for this purpose?
I think the notion of time in relation to the earth's movements (for timekeeping on earth) is fair.
Re: Falsehoods programmers believe about Unix time
#208I don't know if there are libraries that can handle leap seconds or is everyone just counting on NTP sync fixing things whenever a leap second occurs.
Re: Falsehoods programmers believe about Unix time
#209Earlier quoted context omitted.
The obvious correction is to change the duration of a second such that a year is exactly $integer seconds long. While this will make the duration of second drift from year to year, that drift is so small that everyday devices like consumer-grade computers could just ignore it, provided they're NTP synced once every five years or so. Physicists can just keep using whatever they're using and call it by a different name…
The core issue is that the number of days per year is messy, so it's not possible to have a 'nice' number of seconds in a day and also in a year. The best solution is probably just to use a nice number of seconds per day and accept the fact that in 100ish years summer will start in March, not December. It's not like we need to build our entire society around planting and harvest any more.
Re: Falsehoods programmers believe about Unix time
#210Earlier quoted context omitted.
This discussion isn't going to be very meaningful unless you wanna tell us what 'best' means to you.
Are we to infer that your lack of criteria for "best" in your own post means that it too is meaningless? You made a breath-taking leap going from {our society isn't as dependent on planting and harvesting anymore} to {therefore it's "probably best" to radically alter universal concepts of temporality to partially solve an obscure technical problem}. Methinks the burden on proof lies firmly in your court on this one.