> Not all days have 24 hours!  In particular, days affected by Daylight
> Savings Time (in the US, that's usually the first Sunday in April and
> last Sunday in October) will have 23 or 25 hours.

The first and last time I wrote something like this, someone
crossforwarded the thing to i don't know how many people saying "hey, this
is a cool joke" and then thanked me for the good laugh.

Which should make it obvious: never, ever talk about advanced date
calculation in public.

This said, never, ever write your own time-handling routines if you can
pick a carefully-studied standard library portion that already does that.
(or just write a wrapper around the latter)

> Might it be simpler to use the platform's mktime() function to
> avoid these issues? (I believe that's a Posix-ism).

This seems to be the right choice.



Mathieu Bouchard