OxL Reference

method ZonedTime.parse

Parses ISO 8601 (2026-11-03T18:00:00+03:00[Europe/Moscow]) or a pattern with XXX / VV.

Example:

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

fn main() io {
  let z = ZonedTime.parse("2026-11-03T18:00:00+03:00[Europe/Moscow]")!
  print("{z.time.unixSeconds()} {z.tz.name}")
}
Output
1793718000 Europe/Moscow
pub(api) static fn parse(text: str, format: TimeFormat | str = .Iso8601) -> ZonedTime | ParseError

Since. 1.0.0-beta

Parameters

NameType
textstr
formatTimeFormat | str = .Iso8601

Returns

ZonedTime

Errors

  • ParseError @error
  • `ParseError` when the text does not match the format or names an unknown zone.

Effects

none declared (pure unless the body says otherwise)

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

See also