Subj : Re: Operating Systems To : tenser From : Digital Man Date : Fri Apr 12 2024 11:29:20 Re: Re: Operating Systems By: tenser to claw on Sat Apr 13 2024 02:39 am > There's a lot of software out there, written 20 or 30 years > ago, that made a lot of assumptions about the state of the > world; there were a lot of programmers who thought to > themselves in 1991, "Gee, the year 2038 is a long time from > now..." and took shortcuts. Speaking for myself at least, I started using time_t types for storing dates and times in C programs in 1988 and wasn't even aware that it would ever roll-over (go negative) at any point. I don't think I actually realized that most time_t's are signed (can go negative) and that for those systems (C libraries), dates before Jan-1-1970 are *suppoosed* to representable in that way (as negative valeus). [libraies that use unsigned time_t's cannot represent dates before Jan-1-1970] And I'm pretty sure it was 1992 when I did the math and realized that 2038 and 2106 are going to be problematic years for 32-bit time_t-based libraries/programs. It was certainly not discussed in the programming books or among C programmers of the era. We weren't taking shortcuts, we were just following the norms. Use of 64-bit integers for most things seemed excessive/wasteful and in many environments (e.g. 16-bit systems) not practical or even possible. -- digital man (rob) Steven Wright quote #32: The colder the x-ray table, the more of your body is required to be on it. Norco, CA WX: 57.0øF, 82.0% humidity, 4 mph WNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (21:1/183) .