Atom

time.parse()

Parses ISO 8601 date and time.

Signature

time.parse(timestamp)

Parameters

String YYYY-MM-DDThh:mm:ss with optional decimal fraction and required Z or signed hh:mm.

Returns

f64 Unix seconds.

Behavior

Validates Gregorian date and converts to UTC.

Errors

Invalid date, missing zone, leap second or invalid timestamp syntax.

Example

Atom
use time
assert(time.parse('1970-01-01T01:00:00+01:00') == 0)