OxL Reference

method ZonedTime.offset

Offset from UTC at this instant.

Example:

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

fn main() io {
  print("{Time.ofUnixSeconds(0).in(tz"Asia/Tokyo").offset().hours()}")
}
Output
9
pub(api) fn offset() -> Dur

Since. 1.0.0-beta

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also