Created
April 5, 2016 17:22
-
-
Save HeLiBloks/27f7787fbce63aab553e8f2a96966c20 to your computer and use it in GitHub Desktop.
convert dates in nix
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
#nix date conversion | |
# time2unixStamp | |
date -d "2016/03/01 01:00:00" "+%s" | |
#readline | |
while read line ; do echo $line\;$(date -d "$t" "+%s") ; done < $1 | |
#unixTime2human | |
date -d @1458636426 | |
awk '{ print strftime("%c", $0); }' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment