Esc

Time_Zone

structextensionsince 0.36.1Source
  • macOS: Time_Zone works on macOS
  • Linux: Time_Zone works on Linux
  • Windows: Time_Zone works on Windows
  • Wasm: Time_Zone works on Wasm

Declaration

Time_Zone :: struct {
    kind: Time_Zone_Kind;    offset: Offset;// opaque; only this module may dereference it    rules: *void;}

An immutable zone handle. RULES handles own one reference. Assignment borrows; time_zone_retain creates another owner. Release each owner once with time_zone_free; a Zoned borrows its zone.

Example↗
zone, zone_error := time_zone_from_posix("EST5EDT,M3.2.0,M11.1.0");
assert(zone_error.kind == .NONE);
defer time_zone_free(*zone);
assert(zone.kind == .RULES);

See also