0

Unix time is useful for measuring time, whereas other formats are more useful for telling the time.

This is because (apart from time synchronization), it just ticks forward one second at a time.

It doesn't change when our clock for telling the time has an hour change, for example.

However, there does seem to be one exception. It ignores leap seconds, meaning when there is a leap second, it basically jumps back a second.

I'm wondering is there a similar format to Unix time that also includes leap seconds and has no special cases at all?

David Callanan
  • 5,601
  • 7
  • 63
  • 105

1 Answers1

0

Nevermind, unix time has no exception for leap seconds.

I believe the explanation for unix time on Wikipedia is awful:

It is the number of seconds that have elapsed since the Unix epoch, minus leap seconds

This is incorrect, it should be:

It is the number of clock / artificial Earth seconds that have elapsed since the Unix epoch, minus leap seconds

Or in simpler terms:

It is the numbers of measured seconds that have elapsed since the Unix epoch

Hope this solves anyone else's confusion.

David Callanan
  • 5,601
  • 7
  • 63
  • 105
  • Why is this incorrect? The number of physical seconds that has elapsed, minus the leap seconds that have been introduced, should indeed be what is shown by a Unix timestamp. > It is the numbers of measured seconds that have elapsed since the Unix epoch This is definitely wrong, if I were able to measure the seconds since the epoch with a stopwatch, it would count 27 higher than the Unix timestamp. – awwright Jun 16 '22 at 17:04
  • Maybe you are right. We need a consistent definition for seconds. If we use the SI definition for seconds, then I thought that the unix time is just the number of elapsed seconds. Am I wrong? Is one unix second different from an SI second? If so, that would be new information to me. – David Callanan Jun 16 '22 at 18:07
  • The second is the same duration in all the date systems. The difference is that UTC time introduces some discontinuous jumps "backwards" in time where two adjacent econds are both called by the same number (or there's a 61st second in a minute, called :60). TAI does not do this, and so TAI time celebrates the new year 37 seconds earlier than the UTC new year. (And this number changes depending on what year you're in.) – awwright Jun 17 '22 at 19:24
  • In short: the problem is in UTC, 23:00:00-0:00:00 does not necessarily represent a duration of 3600 seconds, sometimes it has been 3601 and it can hypothetically even be 3599. Unix time works the same way. A difference of 3600 in two Unix timestamps might actually mean 3601 seconds, depending on what the date is. – awwright Jun 17 '22 at 19:35
  • @awwright Wow, thank you for informing me about this. TAI looks interesting. – David Callanan Jun 19 '22 at 11:21