Legend:
Library
Module
Module type
Parameter
Class
Class type
Computations with the Temps Atomique International (TAI) timescale.
Overview
This module defines an abstract type and associated functions for computations with values representing epochs in the Temps Atomique International (TAI) timescale. Values are represented internally with the TAI64 format defined by Dan Bernstein, and support precision to the nearest second.
Functions are provided that:
acquire the current time in TAI64 format.
compare, add and subtract values.
convert between TAI64 values and a portable external format called the "TAI64 label", which is essentially an array of eight octets.
convert between TAI64 values and the float values returned by the Unix.time function.
Constants are also provided that define the boundaries of valid TAI64 representations.
Warning: This implementation obtains the current time of day using the POSIX time() function, which returns a value based on the UTC timescale (but with leap seconds "elided" in a way that makes conversions between POSIX time, Standard Time and TAI a perilous undertaking). See the Cf_stdtime module for details.
Warning! The internal logic used here for adjusting the difference between the UTC time scale and TAI timescale due to leap seconds uses data that originates at the International Earth Rotation and Reference System Service, which determines whether and when to insert or delete leap seconds into the UTC timescale. These announcements are made every six months in an IERS bulletin, and provided as a public service by the IETF at <https://www.ietf.org/timezones/data/leap-seconds.list>.
The data in the current implementation expires on 2016 December 28.
The earliest TAI epoch representable in the TAI64 format, corresponding to 16:14:36 on July 14, 146138509945 BCE (in the continuous TAI timescale, which diverges from UTC by not introducing leap seconds). The label is 0000000000000000.
The latest TAI epoch representable in the TAI64 format, corresponding to 7:43:49 on June 19, 146138514283 CE (in the TAI timescale, which diverges from UTC by not introducing leap seconds). The label is 7fffffffffffffff.