Esc

Zoned

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

Declaration

Zoned :: struct {
    timestamp: Timestamp;    zone: Time_Zone;    offset: Offset;}

An instant and a borrowed zone, with its resolved offset.

Example↗
instant, _ := timestamp_from_seconds(0);
z := zoned(instant, time_zone_utc());
assert(z.timestamp.seconds == 0 && z.offset.seconds == 0);

See also