Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Adding to a date using Time::localtime

by ikegami (Pope)
on Feb 21, 2007 at 21:24 UTC ( #601433=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Adding to a date using Time::localtime
in thread Adding to a date using Time::localtime

there will be an error (time difference) of one hour.

Not quite. The result is sometimes a day off. There are no hours in the output, so I don't know how it can be an hour off.

During one hour of the year, the returned date will be only 13 days away, and
during another hour of the year, the returned date will be 15 days away.


Comment on Re^5: Adding to a date using Time::localtime
Re^6: Adding to a date using Time::localtime
by scorpio17 (Monsignor) on Feb 22, 2007 at 14:05 UTC
    Right - I should have said, "there will be an error of one hour in the computed 14 day offset. That is, when you convert 14 days into seconds, it might off by +/-1 hour depending on DST. This will, in turn, cause the final result to be off by a day, as you said.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-10-31 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (216 votes), past polls