Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: time difference

by mifflin (Curate)
on Aug 01, 2005 at 04:44 UTC ( [id://479788]=note: print w/replies, xml ) Need Help??


in reply to time difference

assuming you had two different epoch times $t1 and $t2 you could...
$diff = $t2 - $t1; $ss = $diff % 60; $diff = ($diff - $ss) / 60; $mi = $diff % 60; $hh = ($diff - $mi) / 60; sprintf("%d:%02d:%02d" , $hh, $mi, $ss);
This gives hours:minutes:seconds. I'll leave it as an exercise for you to add the days calculation.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-26 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found