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/5132The timestamp in the headline is actually 1500000027 seconds since the Epoch.
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/5132The timestamp in the headline is actually 1500000027 seconds since the Epoch.
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.
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/5132On 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 )