ISO 8601 and RFC3339 time format with Unix date command

The following command outputs the current time formatted according to ISO 8601 and RFC3339. It can be used for example in JSON/HTML.

date -u '+%FT%TZ'
2024-08-03T14:41:47Z

blog comments powered by Disqus