OxL Reference

op ZonedTime.+

Exact arithmetic (§17.2): the instant moves by exactly d.

Example:

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

fn main() io {
  print("{(Time.ofUnixSeconds(0).in(tz"UTC") + 90m).toIso()}")
}
Output
1970-01-01T01:30: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:2274

See also