4 ms·
My favorite fun fact about Y2K38 is the VMS operating system. > While the native APIs of OpenVMS can support timestamps up to the 31st of July 31086, the C run
by segfaultbuserr 5y ago
My favorite fun fact about Y2K38 is the VMS operating system.
> While the native APIs of OpenVMS can support timestamps up to the 31st of July 31086, the C runtime library (CRTL) uses 32-bit integers for time_t. As part of Y2K compliance work that was carried out in 1998, the CRTL was modified to use unsigned 32-bit integers to represent time; extending the range of time_t up to the 7th of February 2106.
A Y2K38 problem fixed during the Y2K!
- Piskvorrr 5y agoWell, I'd say "postponed" ;)
- acadapter 5y agoWhy unsigned 32 bits and not 64 bits? This is not a proper fix...
- dspillett 5y agoProbably due to concerns about changing the size of many structs that include time_t values, which could cause a lot of bugs in C code and similar where the size had been assumed. Moving to unsigned types doesn't change the storage requirements.
- _kst_ 5y agoThis "fix" also made it impossible to represent times before 1970. Admittedly that's probably a rare problem, but I can imagine it could have broken something (An interesting tidbit: Since 2018-07-22, a 32-bit signed time_t with an epoch of 1970-01-01 has been able to represent the date of birth of every living human. Chiyo Miyako was born 1901-05-02 and died 2018-07-22 at the age of 117 years, 81 days. 2^31-1 seconds before the epoch was 1901-12-13. Reference: https://en.wikipedia.org/wiki/List_of_the_verified_oldest_people https://en.wikipedia.org/wiki/List_of_the_verified_oldest_pe...)