Created
February 9, 2012 19:36
-
-
Save gcatlin/1782303 to your computer and use it in GitHub Desktop.
Unix timestamp and date conversion
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
# On OS X, may need to install coreutils | |
# brew install coreutils | |
# | |
# then use gdate instead of date | |
# Convert Unix timestamp to date string | |
date -d @1193144433 | |
# Convert date string to Unix timestamp | |
date -d "2007-10-23 09:00:33" +%s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment