4 ms·
Wasn't the y2k issue programs that stored numbers as binary coded decimal and only allocated one octet (i.e. two digits) to the date?
by andreareina 4y ago
Wasn't the y2k issue programs that stored numbers as binary coded decimal and only allocated one octet (i.e. two digits) to the date?
- mgerdts 4y agoBCD could be one of many problems, but ASCII strings would me more common in systems I dealt with. There were a lot of assumptions about two digit years that maybe made sense sometime in the 70s for code that you didn’t think would survive more than a few years. Also take a look at struct tm. Its tm_year looked like just a 2 digit year and as such people may format it with printf(“19%02d”,…). It is actually the number of years since 1900. In early 2000 I had to fix a broken ftp server that was sending 19100 as the year.