Skip to content

Instantly share code, notes, and snippets.

@jshen28
Last active September 13, 2018 00:08
Show Gist options
  • Save jshen28/418210396238d811ef1eba41b14da921 to your computer and use it in GitHub Desktop.
Save jshen28/418210396238d811ef1eba41b14da921 to your computer and use it in GitHub Desktop.
# print local date
date
# print UTC date
date -u
# format
date "+%m/%d/%Y -%H:%M:%S"
# date substraction
date -d '1 second/minute/hour ago' +"%Y-%m-%dT%H:%M:%SZ"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment