OxL Reference

method Tm.ofUnixSeconds

The instant s seconds after the Unix epoch (UTC).

Example:

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

fn main() io {
  print(Time.ofUnixSeconds(86400).toIso())
}
Output
1970-01-02T00:00:00Z
pub(api) static fn ofUnixSeconds(s: i64) -> Tm

Since. 1.0.0-beta

Parameters

NameType
si64

Returns

Tm

Effects

none declared (pure unless the body says otherwise)

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

See also