Skip to main content

Module iso_time

Module iso_time 

Source
Expand description

UTC timestamps in the exact form of JavaScript’s toISOString. What: UTC timestamps in the exact form of JavaScript’s Date.prototype.toISOString: YYYY-MM-DDTHH:MM:SS.mmmZ. Why: Transaction owner records carry createdAt and capture records invokedAt in this form; recovery orders dead transactions and the reservation grants turns by comparing these strings, so both wrappers must write the same shape.

In TS you’d write (pseudocode):

new Date().toISOString()

Functions§

civil_from_days
What: The civil date of a day count since 1970-01-01, as (year, month, day). (i64, u32, u32) is a tuple of three numbers. Why: Howard Hinnant’s civil_from_days, exact for the proleptic Gregorian calendar JavaScript dates use.
format_iso_milliseconds
What: Format milliseconds since the Unix epoch as toISOString does for years 0 to 9999. Why: The wrapper only formats the current time; the four-digit year form covers it.
now_iso
What: The current time as toISOString text. Why: Owner and capture records record when the invocation started.