Subject: None
To: None <tech-userlevel@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 06/03/1998 07:29:12
> The year 2000 may not be an issue with UNIX, but what happens around
> 2035 or 2040, when the standard time functions run off the edge of a
> long integer's number of seconds?
The date is in 2038:
% date -u -r 2147483647
Tue Jan 19 03:14:07 GMT 2038
%
What happens? (a) that's a *signed* 32-bit integer; an *unsigned*
32-bit integer would carry us another 68-plus years, to 2106 if I got
the arithmetic right; and (b) it's a 32-bit integer, not a "long".
Given what's happened in the last 40 years, I have no doubt at all that
integers as short as 32 bits will be pretty much passé by the time 2038
rolls around. Certainly if a time_t is still a "long" it'll be wider,
"int" probably will be too. "short" may commonly be only 32 bits, but
I wouldn't bet on even that.
Of course, my crystal ball is no better than anyone else's. I could be
as wrong as the COBOL coders who never expected their code to still be
around by 1999-12-31. :-)
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B