in reply to Re: Using timelocal function
in thread Using timelocal function
I think 732 days is a bit long for two years, even given that 1968 was a leap year. According to my math (done with DateTime), there were 731 days.
I think the reason you're getting a trailing .9583333333 days (a little under an hour) is because your date range crosses daylight savings time (which begins in March). It might also have to do with various leap seconds that have been added over the years.
In any case, I think you'd be much better off using a module to do this calculation for you (see How do I find the difference in days between two dates, in a cool perl way?). They've already been through rigorous testing for this and many other problems.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using timelocal function
by rpike (Scribe) on Feb 04, 2008 at 18:30 UTC | |
|
Re^3: Using timelocal function
by Narveson (Chaplain) on Feb 05, 2008 at 07:19 UTC | |
|
Re^3: Using timelocal function
by rpike (Scribe) on Feb 04, 2008 at 18:44 UTC | |
by kyle (Abbot) on Feb 04, 2008 at 19:14 UTC |