32-bit 2038 issue

Robert Elz kre at munnari.OZ.AU
Tue Nov 11 23:29:27 UTC 1997


    Date:        Tue, 11 Nov 1997 13:50:33 -0800
    From:        Joel.Tornatore at Eng.Sun.COM (Joel Tornatore)
    Message-ID:  <199711112150.NAA26831 at gap.eng.sun.com>

  | changing time_t to an unsigned int would give another
  | 68 years without any of the size/performance problems
  | mentioned in Tom's email.

I made that change back in pre 4.2 bsd days.  It turned out that it
broke too much - most notably, programs that like to print ctime(0)
(and there I mean the time_t with a value of 0, I know ctime really
takes a pointed to a time_t, and ctime(0) would be a null pointer).

The standard behaviour, anywhere west of Greenwich, was to not print
Dec 31 1969 in that case, but some time way into the future, which was
not at all what anyone expected.

So, before 4.2 was actually released, time_t went back signed again.
It was all this that caused some of the time functions able to adapt and
work whether time_t turns out to be signed or not.

kre




More information about the tz mailing list