Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: displaying microseconds from epoch like format

by GrandFather (Sage)
on Oct 09, 2012 at 00:17 UTC ( #997901=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $epTime = 1276218934.155029;
    my ($epoch, $frac) = $epTime =~ /(\d+)\.(\d+)/;
    (my $str = localtime $epoch) =~ s/(.*:\d+)/$1.$frac/;
    
    printf $str;
    
  2. or download this
    Fri Jun 11 13:15:34.15503 2010
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2016-10-01 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.