Roland Turner

about | contact

The date command and ISO 8601 date+time representations

8601 provides a variety of interesting format variations. I routinely wish to use, but can never remember, the following:

$ TZ=UTC date +%Y-%m-%dT%H:%M:%SZ
2009-10-29T04:10:09Z
$ date +%Y-%m-%dT%H:%M:%S%Z
2009-10-29T12:10:43SGT
$

Recorded here for easy reference next time.