in reply to Re: date and time
in thread date and time

The 'strangeness' comes directly from the tm struct the unix routines localtime(2) and gmtime(2) use.
Your comment about array lookups is right on. The day-of-the-week (localtime[6]) also starts at zero to facilitate lookup.