method Tz.of
Time zone by IANA name (Europe/Moscow), UTC, or a fixed offset (+03:00). Prefer the literal tz"…".
Example:
use std.time { Tz }
fn main() io {
print("{Tz.of("Europe/Moscow")!}")
}Output
Europe/Moscow
pub(api) static fn of(name: str) -> Tz | ParseErrorSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
name | str |
Returns
Errors
ParseError@error
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:734