0

So, this has sortof already been asked: Unix time and leap seconds

...but I'm just not getting it. Judging from the lengthy and varied comments, I'm not convinced anybody else does, either.

So, I'll ask my own question. Consider that there is an exact value of a "real" second: 9192631770 transitions of a caesium 133 atom. As I understand, this does not align perfectly with our idea of 60*60*24 seconds in a day, because the length of a day varies, basically, and THOSE don't line up perfectly with year boundaries, hence leap days and leap seconds, etc. Now, suppose that on 00:00:00 Thursday, 1 January 1970, I started a caesium clock going. According to currentmillis.com, as I write this, Unix time is 1565994103 seconds.

Would the caesium clock agree?

Erhannis
  • 4,256
  • 4
  • 34
  • 48
  • No. Your Unix machine has been rebooted a few times (and upgraded, presumably in fact replaced) a few times, and it is more or less in synchrony with the leap seconds that have occurred, but those are not counted by POSIX. The Caesium clock would include the leap seconds; the POSIX value would not. Of course, your system might not be 'pure POSIX' but 'POSIX with leap seconds' and then the answer might be different again. There's also the empirical problem of synchronizing the Unix machine with the Caesium clock, but even theoretically, the two would diverge, I believe. – Jonathan Leffler Aug 16 '19 at 23:04
  • @JonathanLeffler Hmm. Bummer. Ok. If you want to turn your comment into an answer, I'll accept it. – Erhannis Aug 19 '19 at 15:41
  • Side note: it appears that (apart from mistakes and their corrections) the time system I'd probably be looking for is TAI (International Atomic Time - https://en.wikipedia.org/wiki/International_Atomic_Time). – Erhannis Aug 19 '19 at 22:59

0 Answers0