Builtin

to_time

to_time(a)

Returns the value of a converted to a time. a must be an int (the number of microseconds since Jan 1 1970 UTC) or a string (RFC 3339 with nanoseconds) or a tuple (year,month,day,hour,min,sec,nsec,loc).

Examples

int
to_time(1783199723100000)
2026-07-04T22:15:23.1+01:00

string
to_time("2026-07-04T21:15:23.100Z")
2026-07-04T21:15:23.1Z

tuple
to_time(tuple{year:=2026, month:=07, day:=04, hour:=21, min:=15, sec:=23, nsec:=100, loc:=0})
2026-07-04T21:15:23.0000001Z