Is it not irrelevant for most use cases? Leap seconds or whatever. Think of the time of this post. It is stored but how important is the accuracy?
Timestamps are used for a lot of scheduling tasks that need to be reasonably precise. So an event happening one second earlier than expected, or even twice, could be a problem I suppose. Not exactly impossible to deal with, but I guess lots of people screw it up? Haven't really worked on systems where this _truly_ matters.
Unix time is bad and needs replacement, not UTC
11–20 of 96 posts
Re: Unix time is bad and needs replacement, not UTC
#12Is it not irrelevant for most use cases? Leap seconds or whatever. Think of the time of this post. It is stored but how important is the accuracy?
Timestamps are used for a lot of scheduling tasks that need to be reasonably precise. So an event happening one second earlier than expected, or even twice, could be a problem I suppose. Not exactly impossible to deal with, but I guess lots of people screw it up? Haven't really worked on systems where this _truly_ matters.
Re: Unix time is bad and needs replacement, not UTC
#13So if you store two timestamps, you can't rely that the actual time that has passed between storing the two timestamps is equal to their difference, since the clock might have been slow, fast, or might have been synchronised with another clock between the recording of the two timestamps.
I think dealing with leap seconds should work in a similar way as working with other clock synchronisation issues, so I really don't see the point of adding new types of clocks in unix.
Re: Unix time is bad and needs replacement, not UTC
#14>The exact way Unix time handles leap seconds* is complex and an unnecessary detail for this article, but it will suffice to say that (i) whenever a positive leap second occurs, a timestamp is used twice, and (ii) if a negative leap second were to occur, a timestamp is skipped. Huh, I always assumed that Unix time just ignores them and ticks forward. I get why e.g. UTC needs them but why would it make sense for Unix…
Re: Unix time is bad and needs replacement, not UTC
#15Is it not irrelevant for most use cases? Leap seconds or whatever. Think of the time of this post. It is stored but how important is the accuracy?
The fact that accuracy is often not important is also crucial to my proposal of legacy Unix time, because legacy Unix time would eventually go out of sync with the rotation of the Earth just like TAI. In almost all cases this would practically be an aesthetic bug where dates in old user interfaces would be a few seconds off from the real date, and therefore not particularly harmful.
Re: Unix time is bad and needs replacement, not UTC
#16OTOH I believe that for computers, adopting something like TAI for all timestamps would probably a good thing. Re-adjusting display dates for the past where needed is much less complex wrt leap seconds than it is for time zones and DST. The conceptual simplicity of TAI and the invariants afforded by it come with the slight disadvantage that "the future can not be predicted", but we already cannot predict the future of countries changing time zones and DST dates, so we'd not be any worse off in that regard.
[Egypt](https://en.wikipedia.org/wiki/Daylight_saving_time_in_Egypt)
Re: Unix time is bad and needs replacement, not UTC
#17Original comment:
> The simplified definition of Unix time is that Unix time counts the amount of seconds that have passed since the first of January 1970 (which is referred to as “the epoch”, similar to the first of January of 1 AD being the epoch of the Gregorian calendar). This is of course not the complete definition, since it does not take leap seconds into consideration.
I disagree with the statement that UNIX time is not the amount of seconds since the Epoch. Leap seconds never happened, they were added to UTC and UTC only in order to correct it for sunrise and sunset.
If we started an experiment on 23:00 and ended it on 01:00 the next day, but a leap second occured in the mean time, the experiment wasn't running for 7200 seconds, but for 7199 seconds. The leap second had nothing to do with time counting, a stopwatch would not add a second to the reading.
If we started an experiment on Epoch, the UNIX time tells us the amount of seconds this experiment has been running. If we added 86400 leap seconds in between, the experiment would count real time, not our made up time. One day wouldn't be added to the count.
As far as I understand it, that's what UNIX time is, and there's nothing wrong with that. It's a feature.
Please add your opinion.
Re: Unix time is bad and needs replacement, not UTC
#18>The exact way Unix time handles leap seconds* is complex and an unnecessary detail for this article, but it will suffice to say that (i) whenever a positive leap second occurs, a timestamp is used twice, and (ii) if a negative leap second were to occur, a timestamp is skipped. Huh, I always assumed that Unix time just ignores them and ticks forward. I get why e.g. UTC needs them but why would it make sense for Unix…
If Unix time ignored them, the conversion between timestamps and UTC would no longer be possible with just arithmetic operations. You'd need a list of leap seconds and take them into account. Now one can argue if this is better or worse than the current solution, but it's not without its tradeoffs.
Original comment:
Yes, to convert from UNIX time to UTC, you do need a list of leap seconds.
Re: Unix time is bad and needs replacement, not UTC
#19There's something about time that people seem to find very difficult to reason with. It reminds me of the arguments between whether we should use standard time all year or daylight savings time all year.
Re: Unix time is bad and needs replacement, not UTC
#20We should all re-read "the rise of worse is better" until enlightenment (https://dreamsongs.com/RiseOfWorseIsBetter.html).