in reply to displaying microseconds from epoch like format
my $epTime = 1276218934.155029; my ($epoch, $frac) = $epTime =~ /(\d+)\.(\d+)/; (my $str = localtime $epoch) =~ s/(.*:\d+)/$1.$frac/; printf $str;
Prints:
Fri Jun 11 13:15:34.15503 2010
True laziness is hard work
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: displaying microseconds from epoch like format
by r0adawg (Beadle) on Oct 09, 2012 at 18:01 UTC |
In Section
Seekers of Perl Wisdom