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

Tags:  bash

Share: