benilla-re systems structs docs

_timezone

global · crt

Address
0x83274c · 4 bytes, up to 0x83274f
Type
int32_t
Meaning
Holds the zone's seconds west of UTC, 28800 in the file; only __tzset_lk writes it
Confidence
verified, proof one
Finding
crt/time#the-systems-zone

Finding: The system's zone in crt: calendar time

Without TZ, __tzset_lk asks GetTimeZoneInformation. _timezone is Bias in seconds, plus StandardBias when the standard date's month is set. With the daylight date's month and DaylightBias both set, _daylight is 1 and _dstbias (DaylightBias − StandardBias) · 60; otherwise both are 0. The two names go through WideCharToMultiByte into 63 bytes of _tzname's buffers, each emptied when the conversion fails or needs a default character. A failed call keeps the file's zone: 28800 seconds west, daylight time with _dstbias -3600, PST and PDT.

The derivation is in the doc.