OxL Reference

op ZonedTime.-

Exact arithmetic: the instant moves back by exactly d.

Example:

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

fn main() io {
  print("{(Time.ofUnixSeconds(7200).in(tz"UTC") - 1h).toIso()}")
}
Output
1970-01-01T01:00:00Z
pub(api) static op -(a: ZonedTime, d: Dur) -> ZonedTime

Since. 1.0.0-beta

Parameters

NameType
aZonedTime
dDur

Returns

ZonedTime

Effects

none declared (pure unless the body says otherwise)

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

See also