OxL Reference

method Tz.fixed

A zone with a constant offset from UTC.

Example:

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

fn main() io {
  let tz = Tz.fixed(3h)!
  print("{tz.offsetAt(Time.ofUnixSeconds(0)).hours()}")
}
Output
3
pub(api) static fn fixed(offset: Dur) -> Tz | ParseError

Since. 1.0.0-beta

Parameters

NameType
offsetDur

Returns

Tz

Errors

Effects

none declared (pure unless the body says otherwise)

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

See also