benilla-re systems structs docs

first_time

global · crt

Address
0x883c60 · 4 bytes, up to 0x883c63
Type
int32_t
Meaning
Holds 1 once ___tzset has run __tzset_lk; nothing else writes it
Confidence
verified, proof one
Finding
crt/time#the-zone-read-once

Finding: The zone, read once in crt: calendar time

___tzset runs __tzset_lk on its first call only, so the zone is read once per process, by the first localtime, mktime, strftime %Z or ___loctotime_t (0x7426e9, its call at 0x742728, which time and the stat functions reach from 12 sites). With the environment variable TZ set and not empty, the zone is its text: up to three bytes of standard name, then hours west of UTC with an optional - for east, optional :minutes and :seconds, then up to three bytes of daylight name. _daylight is the first byte of that name, 0 without one, and _dstbias keeps its value. An empty TZ leaves the file's zone. _tzset, which would read the zone again, has no caller.

The derivation is in the doc.