in reply to Re^2: Adding to a date using Time::localtime
in thread Adding to a date using Time::localtime
not all days are the same length.
Please explain!
Are you talking about a Leap_second? If Wikipedia is to believed, there have been 23 leap seconds since 1972. Since the OP is only trying to find what date is 14 days into the future, sweetblood's method is only going to have a problem on one second of a day with a leap second. That is, 23 out of the last 1093273318 seconds, as I write this, or one in 47.5 million (y'know, approximately).
I routinely say $ONE_DAY = 24 * 60 * 60. Maybe I'm sloppy, or I just haven't ever written an application where it matters. I suspect if I ever had a problem, I didn't notice or didn't care.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Adding to a date using Time::localtime
by jasonk (Parson) on Feb 21, 2007 at 20:23 UTC | |
by kyle (Abbot) on Feb 21, 2007 at 20:41 UTC | |
by davorg (Chancellor) on Feb 22, 2007 at 08:55 UTC | |
|
Re^4: Adding to a date using Time::localtime
by ikegami (Patriarch) on Feb 21, 2007 at 21:17 UTC | |
|
Re^4: Adding to a date using Time::localtime
by scorpio17 (Canon) on Feb 21, 2007 at 21:19 UTC | |
by ikegami (Patriarch) on Feb 21, 2007 at 21:24 UTC | |
by scorpio17 (Canon) on Feb 22, 2007 at 14:05 UTC |