moreati / python-tai64

TAI64, TAI64N, TAI64NA implementations for Python.
MIT License
1 stars 0 forks source link

leap seconds #1

Open moreati opened 1 year ago

moreati commented 1 year ago

Sources

moreati commented 1 year ago

The OS uses shared memory mapping to publish leap second tables to all processes, and it can extend that table without killing active processes or rebooting the machine. -- https://github.com/dotnet/runtime/pull/50263

moreati commented 3 months ago

apparently recent versions of windows store the leap second table in the registry: https://github.com/microsoft/STL/blob/7f04137880e1c3df5125c1baf808f16f399dee2e/stl/inc/chrono#L2040 https://github.com/microsoft/STL/blob/b9505b9818c8bd53148922730fc2a426e8f38620/stl/src/tzdb.cpp#L556 -- https://github.com/RustCrypto/formats/issues/675#issuecomment-1160668354

moreati commented 3 months ago

If a package containing the Olson tz database weer used as a source of current leap seconds then I think the update frequency of that package would matter. E.g. if pytz contained leapsecond data, and was used as a source then a release atleast every 6 months would be needed, to validate the TTL field - even if no leapsecond change occurs.

moreati commented 3 months ago

On Linux adjtimex() et al can report TAI offset known to the kernel. On macOS ntp_gettime() may do the same.