Skip to content

Instantly share code, notes, and snippets.

@HeLiBloks
Created April 5, 2016 17:22
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 HeLiBloks/27f7787fbce63aab553e8f2a96966c20 to your computer and use it in GitHub Desktop.
Save HeLiBloks/27f7787fbce63aab553e8f2a96966c20 to your computer and use it in GitHub Desktop.
convert dates in nix
#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