ZoneOffsetAt(zone, seconds) gives the offset of a zone such as Asia/Tokyo
at a moment, for world clocks. Native builds switch libc's TZ for one
reading and restore it, refusing names glibc's database lacks; web builds
ask the browser through Intl.DateTimeFormat's longOffset. Names are
limited to IANA characters and cannot leave the zone database.
tests/date_time_linux.sh checks whole, half and quarter hour zones, DST,
unknown names and the restored TZ natively and under node.
On wasm32 Emscripten's time_t is 64-bit while long stays 32-bit. The
pointer-sized time() binding was a linker signature mismatch that trapped
on the first call, so a web page reading the local time froze (Werkzeug's
Clock), and clock_gettime wrote a 16-byte timespec into an 8-byte struct,
leaving the monotonic clock at whole seconds. PLATFORM_WEB builds now use
64-bit seconds and Emscripten's timespec layout. tests/date_time_linux.sh
checks both modules' layouts against Emscripten's time.h, links with fatal
linker warnings and runs the clocks under node when emcc is available.
std/date_time_linux declared time_t, struct timespec and tm_gmtoff as
64-bit, but they are long-sized and 32-bit on armeabi-v7a.
UnixMilliseconds returned -1 there, so a 32-bit phone saw the epoch:
Werkzeug's Auth showed the code for 1970 on a Moto e6 play. They now use
isize like std/timer_linux, and seconds a 32-bit time_t cannot hold give
an invalid date. tests/date_time_linux.sh checks the layouts against
time.h, also for armv7a and aarch64 Android when ZIRAN_THREAD_ANDROID_NDK
is set.