OxL Reference

method Tz.offsetAt

Offset from UTC at the instant t.

Example:

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

fn main() io {
  let tz = Tz.of("Europe/Moscow")!
  print("{tz.offsetAt(Time.ofUnixSeconds(0)).hours()}")
}
Output
3
pub(api) fn offsetAt(t: Tm) -> Dur

Since. 1.0.0-beta

Parameters

NameType
tTm

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also