Skip to content

Instantly share code, notes, and snippets.

@justdoit0823
Last active February 28, 2018 06:24
Show Gist options
  • Save justdoit0823/bf534512c9046e0eebaaab5e75b4bca8 to your computer and use it in GitHub Desktop.
Save justdoit0823/bf534512c9046e0eebaaab5e75b4bca8 to your computer and use it in GitHub Desktop.
Use `date` command in terminal
# print unix timestamp
date +%s
# print datetime represented by unix timestamp
date -r (macOS)
date --date='@1502693336' (Linux)
date +%s --date='2018-11-12' (Linux)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment