in reply to Re: Good & Easy Date Module?
in thread Good & Easy Date Module?
I used Date::Calc a while back when grovelling through web logs. In essence, I wanted to split out information week by week. I used Time::Local to convert the the web timestamp into epoch time. I then had to walk backwards, firstly to get back to Sunday 0:00, and from there walk backwards week by week.
The details are a little hazy, and in any event the project got wiped out by a catastrophic hard disk failure before I backed things up.
The thing is, I was using Date::Calc::Add_Delta_DHMS, walking back week by week, and started getting weird off-by-one errors. In the end I got around the problem by just dealing with epoch time and subtracting 86400*7, and the numbers came out fine.
I did mean to prepare a test to prove or disprove the bug, but ran out of tuits. All that to say watch out if you use the Add_Delta_* functions.
grinder
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Beware Date::Calc::Add_Delta_DHMS
by merlyn (Sage) on Feb 21, 2001 at 23:25 UTC | |
by grinder (Bishop) on Feb 21, 2001 at 23:33 UTC | |
by merlyn (Sage) on Feb 21, 2001 at 23:36 UTC |