Basic Command Line Date/Timestamp Examples

July 2012
ISO 8601
date -Iseconds
Output:
2025-10-17T19:32:54-04:00
Epoch Seconds
date +%s
Output:
1760744041
Timezone Offset
date +%z
Output:
-0400

NOTE: this is not an ISO 8601 or 3339 compliant timezone. Those require a colon in them like -04:00

Basis string
date "+%B %-d, %Y"
Output:
October 17, 2025
end of line