in reply to Finding the difference between 2 dates in seconds
If you wanted this to be absolutely correct for ANY two dates, there are plenty of complications to consider: not least of them being leap years and worldwide time zones.
I recently had to solve a similar problem and looked into various modules out there, and concluded that DateTime was the best one to use. May be worth you taking a look.
|
---|