Created
March 18, 2018 15:53
-
-
Save guicaro/66607da642b803798c4f41308ed98b9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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