Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Seconds conversion

by Matts (Deacon)
on Jul 09, 2002 at 09:21 UTC ( [id://180434] : note . print w/replies, xml ) Need Help??


in reply to Seconds conversion

Use Time::Seconds from the Time::Piece distribution. It allows you to do:

my $secs = Time::Seconds->new(1332443); printf "%d days, %d hours, %d min, %d sec\n", $secs->days, $secs->hours, $secs->mins, $secs->secs;