Esc

timestamp_from_micros

procedureextensionsince 0.36.1Source
  • macOS: timestamp_from_micros works on macOS
  • Linux: timestamp_from_micros works on Linux
  • Windows: timestamp_from_micros works on Windows
  • Wasm: timestamp_from_micros works on Wasm

Converts signed Unix microseconds, checking the UTC year range.

Signature

timestamp_from_micros :: (value: s64) -> (Timestamp, Time_Error)
Example↗
instant, error := timestamp_from_micros(1500000);
assert(error.kind == .NONE && instant.seconds == 1 && instant.nanoseconds == 500000000);

See also