While going through the Logstash date plugin documentation at
I came across TAI64N
date format.
Can someone please explain about this time format?
While going through the Logstash date plugin documentation at
I came across TAI64N
date format.
Can someone please explain about this time format?
TAI stands for Temps Atomique International, the current international real-time standard. One TAI second is defined as the duration of 9,192,631,770
periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium atom. TAI also specifies a frame of reference.
From Toward a Unified Timestamp with explicit precision
TAI64 defines a 64-bit integer format where each value identifies a particular SI second. The duration of SI seconds is defined through a known, precise count of state transitions of a cesium atom. Time is structured as a sequence of seconds starting January 1, 1970 in the Gregorian calendar, when atomic time (TAI) became the international standard for real time. The standard defines 262 seconds before the year 1970, and another 262 from this epoch onward, thus covering a span of roughly 300 billion years, enough for most applications.
The extensions TAI64N and TAI64NA allow for finer time resolutions by referring to particular nanoseconds and attoseconds (10-18s), respectively, within a particular second.
While TAI64 is compellingly simple and consistent, it has to be extended not only with regard to fine resolutions, but in other ways as well.
Precisely, TAI64 format is better for various reasons such as,
You can read further on, Bernstein D.J. 2002. "TAI64, TAI64N, and TAI64NA,
TAI64, TAI64N, and TAI64NA
TAI and real time
TAI64 labels and external TAI64 format. A TAI64 label is an integer between 0 and 2^64 referring to a particular second of real time. Integer
s
refers to the TAI second beginning exactly2^62 - s
seconds before the beginning of 1970 TAI, ifs
is between 0 inclusive and 2^62 exclusive; or the TAI second beginning exactlys - 2^62
seconds after the beginning of 1970 TAI, ifs
is between 2^62 inclusive and 2^63 exclusive. Integers 2^63 and larger are reserved for future extensions. Under many cosmological theories, the integers under 2^63 are adequate to cover the entire expected lifetime of the universe; in this case no extensions will be necessary. A TAI64 label is normally stored or communicated in external TAI64 format, consisting of eight 8-bit bytes in big-endian format. This means thatbytes b0 b1 b2 b3 b4 b5 b6 b7
represent the labelb0 * 2^56 + b1 * 2^48 + b2 * 2^40 + b3 * 2^32 + b4 * 2^24 + b5 * 2^16 + b6 * 2^8 + b7
.For example,
bytes 3f ff ff ff ff ff ff ff hexadecimal
represent the second that ended 1969 TAI;bytes 40 00 00 00 00 00 00 00 hexadecimal
represent the second that began 1970 TAI;bytes 40 00 00 00 00 00 00 01 hexadecimal
represent the following second.Bytes 40 00 00 00 2a 2b 2c 2d hexadecimal
represent1992-06-02 08:07:09 TA
I, also known as1992-06-02 08:06:43 UTC
.
© 2022 - 2025 — McMap. All rights reserved.