Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++ Subject: Re: xkcd: Y2K and 2038 Date: Sat, 12 Nov 2022 18:00:01 -0800 Organization: None to speak of Lines: 38 Message-ID: <87mt8vlila.fsf@nosuchdomain.example.com> References: MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="0663ea4318b40f91c3643b9427cbbc2e"; logging-data="1360263"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4DqzV2RkeDGQIOSk8uIF2" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:wfZdrX38LYuw2tWPUaui9fGm5SY= sha1:EdLpwB08SjXQM/WLPmJVxz6szqM= Xref: csiph.com comp.lang.fortran:73944 comp.lang.c:168165 comp.lang.c++:87343 Lynn McGuire writes: > On 11/12/2022 1:36 AM, Thomas Koenig wrote: >> Lynn McGuire schrieb: >>> xkcd: Y2K and 2038 >>> https://xkcd.com/2697/ >>> >>> It shouldn't cost more than a trillion dollars or two to investigate this. >> The switchover to 64-bit systems should have done this. Not sure >> that this cost a trillion dollars, but computers usually have a >> limited lifetime, so they had to be replaced anyway. > > Most software is still 32 bit. Having the operating system as 64 bit > helps but it does not solve the problem of the 32 bit software running > on it. An unsigned 32 bit integer only gets us to 2106. > https://en.wikipedia.org/wiki/Year_2038_problem > > Porting software to 64 bit is a tremendous work for most software. An unsigned time_t makes it impossible to represent times before 1970. Not all software is going to care about that, but in my opinion it's an unacceptable price. There are still 32-bit systems and environments. On my 64-bit Ubuntu system I can compile with `gcc -m32` and get 32-bit pointers and time_t. But since C and C++ require support for 64-bit integers anyway, it should be practical to require 64-bit time_t even on 32-bit systems. (Not sure about Fortran.) The real problem is going to be 32-bit (or smaller) embedded systems whose software can't be updated. On the other hand, a lot of such systems probably don't care what time it is. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */