Why C is really a bad programming language

N

Nobody

MS-DOS used 1980. The FAT, amusingly enough, didn't use 1980-01-01, but
(at least, that's what a little experiment seemed to indicate)
1980-00-00.

FAT stores time broken down into Y/M/D h:m:s. The stored year has 1980
subtracted from it, and is a 7-bit value, so it will wrap in 2107. Given
the nature of the computer industry, I wouldn't be all that surprised if
FAT is still around in 2107; at least I won't be around to deal with it.
In VC++. That does not mean that other implementations on Windows have
to use the same kind of time_t.

It's reflected in the corresponding msvcrt??.dll, so it's not entirely a
compiler issue.
 
F

Flash Gordon

Nobody said:
FAT stores time broken down into Y/M/D h:m:s. The stored year has 1980
subtracted from it, and is a 7-bit value, so it will wrap in 2107. Given
the nature of the computer industry, I wouldn't be all that surprised if
FAT is still around in 2107; at least I won't be around to deal with it.

I know of system which has problems when we reach 2028. I pointed this
out when doing the Y2K checks for things I was involved in at the time.
However, from memory we only have a support contract till 2020 (or their
abouts) and the simple solution in this specific case, which I
specified, was to just set the date back a few decades and anotate the
printouts it produces appropriately (the printout has the data/time of
run, but that is only to record the date/time of run). The OS in
question uses a 7 bit number for the year as an offset from 1900.
It's reflected in the corresponding msvcrt??.dll, so it's not entirely a
compiler issue.

Which is the Microsoft Visual C Run Time... so it is tied pretty tightly
with MSVC.

Some other implementations have always used their own run times, and if
I recall correctly Borland is one player who used to have noticeable
market share who used (and probably still use) their own library.
Actually, MinGW is the only one I know for certain other than MS who use
the MS C library for their C implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top