Created
March 22, 2009 14:35
-
-
Save sit/83180 to your computer and use it in GitHub Desktop.
Simple Perl script to convert unix epoch times to text.
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
#!/usr/bin/perl -w | |
# | |
# Convert unix times (on command line or one-per-line via stdin) | |
# to human readable times in local timezone. | |
# | |
if (@ARGV) { | |
print join("\n", map { scalar localtime($_); } @ARGV), "\n"; | |
} else { | |
while (<STDIN>) { | |
chomp; | |
print scalar localtime $_, "\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment