get the ISO-8601 date in bash


date -u +"%Y-%m-%dT%H:%M:%SZ"

Update: the double quotes aren’t necessary, so you can do:

date -u +%Y-%m-%dT%H:%M:%SZ

Date: 2017-12-18

Tags:  bash  iso8601

Share: