Convert a Unix time_t (optionally milliseconds) to ASCII date/time, and
vice-versa, in UTC, local and a given time zone.
Usage¶
time2date [TIME_T] # no arg => current time; also accepts a date string| Option | Purpose |
|---|---|
[TIME_T] | Epoch seconds, or an ISO-ish date string (optional positional) |
--TZ / -z | Time zone for the conversion |
--miliseconds / -m | Treat the input as milliseconds |
Prints the timestamp (and its hex form) plus UTC + local (and named-TZ)
ISO-8601 strings and yday.
See also¶
time2range— period start/end boundaries.