[Info-vax] 2038 32-bit time_t overflow, was: Re: DCL Output Parsing, Compatibility, and Terrible User Interfaces
Johnny Billquist
bqt at softjar.se
Sun Dec 2 07:21:25 EST 2018
On 2018-11-28 21:19, Bill Gunshannon wrote:
> On 11/28/18 5:19 AM, Johnny Billquist wrote:
>> On 2018-11-26 21:10, Dave Froble wrote:
>>> I thought 2038 was a C issue, not an OS issue. Did I misunderstand?
>>
>> Technically it can't be a C issue, because C itself have no clue about
>> time. But it's a potential issue with the C standard library.
>>
>> It might be that the latest C standard also includes the standard C
>> library (I have a vague memory that it is), but I think it just says
>> time_t, without saying how that type actually looks like.
>>
>> Unix internally uses that same format, so for Unix it is a real issue
>> with or without C. So it's definitely an OS issue.
>>
>> And the format is basically just the concept of seconds since the
>> start of the epoch, which is defined as Jan 1, 1970.
>> And if you use that, and the value is stored in a signed 32 bit
>> integer, then you'll roll over in 2038.
>>
>> So any program that uses this format, with such a data type, will get
>> into trouble. No matter which OS it runs on, and no matter which
>> language is used.
>>
>> And any OS that uses this format, with such a data type, will get into
>> trouble, no matter what application is running, written in any language.
>>
>> VMS obviously do not have a problem with the latter scenario, but can
>> have trouble with the former.
>>
>> (And PDP-11 C under RSX will definitely hit this problem as well,
>> since time_t is a signed 32-bit integer there, even though internal
>> time in RSX won't flip over and die until the year 34668 at the
>> earliest.)
>>
>> And just to be clear, most Unixes have long since addressed this by
>> extending time_t to 64 bits. But anyone with an old, legacy version of
>> Unix will surely hit fun times in 2038 as well.
>>
> So you mean my Ultrix-32 systems will enter the same twilight zone
> as my RSTS systems. :-)
I haven't looked at Ultrix-32, but if you say so...
> I left Ultrix-11 out of this as I have the source so I can fix it
> when the time comes. :-)
Ultrix-11 seems like a high probability of having the problem. Time to
start fixing. :-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list