Expand description
ITS time utilities.
The ITS epoch is 2004-01-01 00:00:00 UTC (TAI), which corresponds to Unix timestamp 1072915200. A leap-second offset of 5 s is added to convert from UTC to TAI.
Constants§
- ELAPSED_
MILLISECONDS ELAPSED_SECONDSin milliseconds.- ELAPSED_
SECONDS - Leap seconds inserted since the ITS epoch (TAI − UTC drift since 2004: 2005, 2008, 2012, 2015 and 2016). TimestampIts counts TAI milliseconds (ETSI TS 102 894-2), so this offset is added to UTC time.
- ITS_
EPOCH - Unix timestamp of the ITS epoch (2004-01-01T00:00:00 UTC).
- ITS_
EPOCH_ MS ITS_EPOCHin milliseconds.
Functions§
- time
- Parity alias for Python
TimeService.time(). - timestamp_
its - Parity alias for Python
TimeService.timestamp_its()(returns milliseconds). - timestamp_
its_ microseconds - Return the current ITS timestamp in microseconds (TAI, ITS epoch).
- unix_
ms_ to_ its_ ms - Convert a Unix (UTC) timestamp in ms to ITS time (TAI ms since the ITS epoch), i.e. the TimestampIts of ETSI TS 102 894-2. Saturates at 0.
- unix_
time_ secs - Return the current UTC timestamp in seconds (as
f64).