epoch2local

Another little tidbit.. I use this frequently to translate epoch timestamps from a Postgres database log table:

#!/usr/bin/perl
# translate epoch time to human readable local time
use strict;
use warnings;
my $epoch = $ARGV[0];
if ( $epoch ) {
print "Epoch time: ".$epoch."\n";
print "Local time: ".localtime($epoch)."\n";
} else {
print "This script takes an argument of an epoch timestamp and translates it to local time:\n\n";
print " perl epoch2local.pl 1131662204\n\n";
}