How to generate an ISO8601 date using date on macOS
The Linux date
utility takes an -I
or --iso-8601
flag, but the macOS one doesn’t.
The way to do it on macOS is
date -u +"%Y-%m-%dT%H:%M:%SZ"
The Linux date
utility takes an -I
or --iso-8601
flag, but the macOS one doesn’t.
The way to do it on macOS is
date -u +"%Y-%m-%dT%H:%M:%SZ"