Skip to content

Instantly share code, notes, and snippets.

@libitte
Last active December 18, 2015 21:39
Show Gist options
  • Select an option

  • Save libitte/5849237 to your computer and use it in GitHub Desktop.

Select an option

Save libitte/5849237 to your computer and use it in GitHub Desktop.
from unixtime, to unixtime

to_unixtime

perl -e 'use Date::Parse;\$t=\"@ARGV\";printf(\"\$t\t%d\n\",str2time(\$t))'

from_unixtime

perl -e 'for(@ARGV){@t=localtime(\$_);printf(\"\$_\t%d/%02d/%02d %02d:%02d:%02d\n\",@t[5]+1900,@t[4]+1,@t[3],@t[2],@t[1],@t[0])}'
@libitte
Copy link
Author

libitte commented Jun 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment