Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 rifling through the Monastery: (10)
As of 2014-09-22 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls