OxL Reference

method Tm.parse

Parses ISO 8601 with an offset (2026-11-03T18:00:00+03:00) or a pattern; text without an offset is UTC.

Example:

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

fn main() io {
  print("{Time.parse("1970-01-01T00:01:00Z")!.unixSeconds()}")
}
Output
60
pub(api) static fn parse(text: str, format: TimeFormat | str = .Iso8601) -> Tm | ParseError

Since. 1.0.0-beta

Parameters

NameType
textstr
formatTimeFormat | str = .Iso8601

Returns

Tm

Errors

Effects

none declared (pure unless the body says otherwise)

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

See also