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

Re: Timegm and timelocal

by Zaxo (Archbishop)
on Jun 07, 2007 at 06:41 UTC ( [id://619745]=note: print w/replies, xml ) Need Help??


in reply to Timegm and timelocal

That depends entirely on where your time data comes from. If it is based on local time, you have no choice but timelocal. If it is based on UTC, timegm will do.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Timegm and timelocal
by Chon-Ji (Novice) on Jun 07, 2007 at 06:45 UTC
    I see, since I just need the conversion to compute for the seconds elapsed then timegm will do right?

      Right, so long as you can ignore leap seconds.

      After Compline,
      Zaxo

        And DST changes.

        However, with the "10 minute" clarification below, Skeeve's solution is a good one.

        --MidLifeXis

        Based on my very shallow understanding of leap seconds, they won't happen within a single day, if that's the case then I'm still ok with timegm since the elapsed time of my transactions are at maximum 10 minutes apart

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-16 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found