type Tz
An IANA time zone (the type is declared in the prelude; literal tz"Europe/Moscow").
Example:
use std.time { Tz }
fn main() io {
let tz = Tz.of("Europe/Berlin")!
print(tz.name)
}Output
Europe/Berlin
pub(api) type Tz = std.core.TzSince. 1.0.0-beta
Methods
of | (name: str) -> Tz | ParseErrorTime zone by IANA name (Europe/Moscow), UTC, or a fixed offset (+03:00). |
node | () -> Tz ioThe time zone of this node |
fixed | (offset: Dur) -> Tz | ParseErrorA zone with a constant offset from UTC. |
offsetAt | (t: Tm) -> DurOffset from UTC at the instant t. |
isDstAt | (t: Tm) -> boolTrue when daylight saving time is in effect at t. |
abbreviationAt | (t: Tm) -> strZone abbreviation at t (MSK, EST); may be empty. |
show | () -> strThe zone name. |
toString | () -> strThe zone name. |
Defined in: std/time/time.oxl:122