Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Is there a way to convert epoch time into mm/dd/yy hh:mm:ss

by Belgarion (Chaplain)
on Apr 19, 2004 at 21:18 UTC ( [id://346468]=note: print w/replies, xml ) Need Help??


in reply to Is there a way to convert epoch time into mm/dd/yy hh:mm:ss

Another option would be to use the Time::Piece module. It replaces the built in localtime function with an object based method.

You could then do something like this:

use Time::Piece; my $t = localtime($epoch); print $t->strftime("%m/%d/%y %H:%M:%S");

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found