Results 490 comments of Jacob Lifshay

In Rust, zero-variant enums are generally size zero (though not currently guaranteed). they are types which can not ever have any values of that type, so they're used for code...

comparison on my system (after installing ntp so linux has the correct offset): note how the result from linux and `Tai64N::now()` differ -- linux: `1655618465` vs. tai64: `1655618438` -- `SystemTime`:...

how about downloading the official leap-second table and converting it to rust in a build.rs? you could have that enabled by an enabled-by-default feature. [apparently](https://salsa.debian.org/pkg-ntp-team/ntp/-/blob/527626f21f8a3c5138dd67a62342801cec5cdc1d/scripts/update-leap/update-leap.in#L48) an official source is https://www.ietf.org/timezones/data/leap-seconds.list

for wireguard compatibility, you could add a disabled-by-default feature `assume-incorrect-10s-offset` and release a new major version, or maybe instead just add a `now_with_assumed_offset` function (and similar for other UTC-based interfaces).

> I'd probably suggest against making network connections from a build script, especially in any security-related package (indeed there are renewed efforts underway to run build scripts under WASM). ok,...

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

I would expect the test program to print `"Test"` twice.