Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Although the point where we reach 1.5 Ms since the Epoch actually occurs slightly earlier at 2017-07-14 02:39:33 +0000 , as can be seen on a system using Arthur David Olson's "right" timezones.

    jdebp % TZ=right/UTC date +"%s %F %T %z" -d "@1500000000"
    1500000000 2017-07-14 02:39:33 +0000
    jdebp %
* https://unix.stackexchange.com/a/327403/5132

The timestamp in the headline is actually 1500000027 seconds since the Epoch.



POSIX time doesn't count leap seconds (i.e., "seconds since the Epoch" are not actually elapsed seconds) and therefore POSIX time 1.5e6 is 2017-07-14T02:40:00 (UTC scale) exactly

right/UTC uses 1970-01-01 00:00:10 (TAI scale) epoch (it is slightly different from 1970-01-01 00:00:00 (UTC scale) -- the Epoch)

2017-07-14 02:39:33 (UTC scale) is 2017-07-14T02:40:10 (TAI scale) i.e., it is 1.5e9 seconds since the epoch used for "right" timezones, not the Epoch.


No. Read the output of the date command and the aforementioned Stack Exchange answer again. The Epoch was the same physical second in both the "right" and the "posix" systems. It is 1.5 Gs (not Ms as I mistyped) since that second at 2017-07-14 02:39:33 +0000.

The fact that you've got a difference of 37 between your two values should be a clue that you've got this wrong. The current difference between UTC and TAI-10 is 27 seconds. Again, read the Stack Exchange answer for details.

And 1.5 Gs since the Epoch will be 2017-07-14 02:39:33 +0000 on both "posix" and "right" systems. A "right" wall clock reads the same as a "posix" wall clock, except at leap seconds of course. 2017-07-14 02:39:33 "posix" is the same point in time as 2017-07-14 02:39:33 "right": 1.5 Gs since the Epoch. It is not the same point in time as 2017-07-14 02:40:10 "right"/"posix", which is 1500000037 seconds since the Epoch.

    jdebp % TZ=right/UTC date +"%s %F %T %z" -d "@1500000037"
    1500000037 2017-07-14 02:40:10 +0000
    jdebp %
* https://unix.stackexchange.com/a/294715/5132


wrong. Don't confuse TAI and TAI-10. Don't confuse POSIX time [1] and seconds since epoch (time() value) in "right" timezones.

On the "difference of 37": the current TAI-UTC == 37s [2] (10s from 1972 + 27 leap seconds).

On "the same physical second": look at the value of TAI-UTC in the period before 1972 (if you plug the numbers then TAI-UTC is around 8 seconds at 1970-01-01 00:00:00 UTC, not 10s. The epochs are not the same. They are "slightly different"). The same physical second corresponds to 1972 (by definition), not 1970:

  1972-01-01 00:00:00 (UTC scale) == 1972-01-01 00:00:10 (TAI scale) 
Note: :10, not :00, note: TAI, not TAI-10.

To reiterate:

POSIX time 1.5e9 corresponds to 2017-07-14T02:40:00 (UTC scale) exactly.

1.5e9 "seconds since epoch" (not the Epoch) for "right" timezones corresponds to 2017-07-14T02:40:10 (TAI scale) == 2017-07-14 02:39:33 (UTC scale).

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_...

[2] http://hpiers.obspm.fr/eop-pc/index.php?index=TAI-UTC_tab&la...

(the authoritative source on leap seconds. It publishes Bulletin C ftp://hpiers.obspm.fr/iers/bul/bulc/BULLETINC.GUIDE )




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: