Skip to content

Instantly share code, notes, and snippets.

@guicaro
Created March 18, 2018 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guicaro/66607da642b803798c4f41308ed98b9a to your computer and use it in GitHub Desktop.
Save guicaro/66607da642b803798c4f41308ed98b9a to your computer and use it in GitHub Desktop.
dateToMillis() {
#date as YYYY-MM-DD
echo $((`gdate -d $1 +%s` * 1000))
}
millisToDate() {
gdate -d @`echo $(( $1 / 1000 ))`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment