Skip to content

Instantly share code, notes, and snippets.

@Fastidious
Created December 22, 2016 12:03
Show Gist options
  • Save Fastidious/3ee395013ad012ef901adf564a6213f8 to your computer and use it in GitHub Desktop.
Save Fastidious/3ee395013ad012ef901adf564a6213f8 to your computer and use it in GitHub Desktop.
To generate it (from current date/time):
`date +%s`
Under macOS/BSD, to generate it based a given date:
`date -j -f "%d-%M-%Y" 20-12-2016 +%s`
And on Linux:
`date --date="20-12-16" +%s`
EPOCH to human:
`date -d @epoch` (Linux)
`date -r epoch` (macOS/BSD)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment