OxL Reference

method Tz.of

Time zone by IANA name (Europe/Moscow), UTC, or a fixed offset (+03:00). Prefer the literal tz"…".

Example:

oxl✓ checked in CI
use std.time { Tz }

fn main() io {
  print("{Tz.of("Europe/Moscow")!}")
}
Output
Europe/Moscow
pub(api) static fn of(name: str) -> Tz | ParseError

Since. 1.0.0-beta

Parameters

NameType
namestr

Returns

Tz

Errors

Effects

none declared (pure unless the body says otherwise)

Defined in: std/time/time.oxl:734

See also