zdump loop problem

Robert Elz kre at munnari.OZ.AU
Tue Nov 25 17:11:15 UTC 2008

    Date:        Tue, 25 Nov 2008 07:37:36 -0800
    From:        Paul Eggert <eggert at cs.ucla.edu>
    Message-ID:  <87hc5vhl4v.fsf at penguin.cs.ucla.edu>

  | It can also happen if time_t is unsigned

I thought that was not permitted these days?

I tried that as an experiment in the lead up to 4.2BSD (or some similar
version, might have been earlier) and it didn't survive even early beta
test versions, way too much assumes that time_t must be signed (including
a conversion of (time_t)0 to a struct tm if you're anywhere west of Greenwich -
I've always been (almost always been) east, so that problem never
revealed itself to me...)   All the existing problems could probably be
fixed, if they could be found, but new ones would just keep occurring.

I haven't seen anyone attempt that again in ages I think, and I really
doubt that the issue is likely to arise (with time_t only rationally
possible at 32 bits it made sense to attempt to get the extra 70
years by using the extra bit, with 64 bit time_t that's irrelevant,
but being able to do ordinary subtraction of time_t values isn't).


More information about the tz mailing list