OxL Reference

method ZonedTime.in

The same instant in another zone.

Example:

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

fn main() io {
  let utc = Time.ofUnixSeconds(0).in(tz"UTC")
  print("{utc.in(tz"Asia/Tokyo").toIso()}")
}
Output
1970-01-01T09:00:00+09:00[Asia/Tokyo]
pub(api) fn in (other: Tz) -> ZonedTime

Since. 1.0.0-beta

Effects

none declared (pure unless the body says otherwise)

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

See also