@@ -690,7 +690,7 @@ def _default_scale(self):
690690
691691class TimeUnix (TimeFromEpoch ):
692692 """
693- Unix time: seconds from 1970-01-01 00:00:00 UTC, ignoring leap seconds.
693+ Unix time (UTC) : seconds from 1970-01-01 00:00:00 UTC, ignoring leap seconds.
694694
695695 For example, 946684800.0 in Unix time is midnight on January 1, 2000.
696696
@@ -710,38 +710,53 @@ class TimeUnix(TimeFromEpoch):
710710
711711class TimeUnixTai (TimeUnix ):
712712 """
713- Seconds from 1970-01-01 00:00:08 TAI (see notes), including leap seconds .
713+ Unix time (TAI): SI seconds elapsed since 1970-01-01 00:00:00 TAI (see caveats) .
714714
715- This will generally differ from Unix time by the cumulative integral number
716- of leap seconds since 1970-01-01 UTC. This convention matches the definition
717- for linux CLOCK_TAI (https://www.cl.cam.ac.uk/~mgk25/posix-clocks.html).
715+ This will generally differ from standard (UTC) Unix time by the cumulative
716+ integral number of leap seconds introduced into UTC since 1972-01-01 UTC
717+ plus the initial offset of 10 seconds at that date.
718+
719+ This convention matches the definition of linux CLOCK_TAI
720+ (https://www.cl.cam.ac.uk/~mgk25/posix-clocks.html),
721+ and the Precision Time Protocol
722+ (https://en.wikipedia.org/wiki/Precision_Time_Protocol), which
723+ is also used by the White Rabbit protocol in High Energy Physics:
724+ https://white-rabbit.web.cern.ch.
718725
719726 Caveats:
720727
721728 - Before 1972, fractional adjustments to UTC were made, so the difference
722729 between ``unix`` and ``unix_tai`` time is no longer an integer.
723730 - Because of the fractional adjustments, to be very precise, ``unix_tai``
724- is the number of seconds since ``1970-01-01 00:00:08 TAI`` or equivalently
725- ``1969-12-31 23:59:59 .999918 UTC``. The difference between TAI and UTC
731+ is the number of seconds since ``1970-01-01 00:00:00 TAI`` or equivalently
732+ ``1969-12-31 23:59:51 .999918 UTC``. The difference between TAI and UTC
726733 at that epoch was 8.000082 sec.
727- - On the day of a leap second the difference between ``unix`` and ``unix_tai``
728- times increases linearly through the day by 1.0. See also the
734+ - On the day of a positive leap second the difference between ``unix`` and
735+ ``unix_tai`` times increases linearly through the day by 1.0. See also the
729736 documentation for the `~astropy.time.TimeUnix` class.
737+ - Negative leap seconds are possible, though none have been needed to date.
730738
731739 Examples
732740 --------
733741
742+ >>> # get the current offset between TAI and UTC
734743 >>> from astropy.time import Time
735744 >>> t = Time('2020-01-01', scale='utc')
736745 >>> t.unix_tai - t.unix
737- 29 .0
746+ 37 .0
738747
748+ >>> # Before 1972, the offset between TAI and UTC was not integer
739749 >>> t = Time('1970-01-01', scale='utc')
740750 >>> t.unix_tai - t.unix # doctest: +FLOAT_CMP
741- 8.200000198854696e-05
751+ 8.000082
752+
753+ >>> # Initial offset of 10 seconds in 1972
754+ >>> t = Time('1972-01-01', scale='utc')
755+ >>> t.unix_tai - t.unix
756+ 10.0
742757 """
743758 name = 'unix_tai'
744- epoch_val = '1970-01-01 00:00:08 '
759+ epoch_val = '1970-01-01 00:00:00 '
745760 epoch_scale = 'tai'
746761
747762
0 commit comments