MS-DOS date/time

Richard B. Johnson (root@analogic.com)
Wed, 16 Jul 1997 22:11:05 -0400 (EDT)


I'm running 2.1.44, generated from patches before the buffer problem. This
uses the old buffer scheme which makes it quite usable as I await the
next "real" alpha/beta release.

I note that some file dates on a mounted MS-DOS file system are in the
future. Some, but not all. Most are correct. Some, generated at certain
times, are 131,072 seconds in the future from the time shown from MS-DOS
6.2. This is 2 * 0xffff. I don't know why. I also have not discovered
the special circumstances (file creation time) that makes this problem
occur since the problem occurs infrequently. The algorithm for extracting
the MS-DOS file date/time is not sensitive to long/short wraps so it's
pretty wierd.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 <-- 16 bits of date
y y y y y y y m m m m d d d d d

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 <-- 16 bits of time
h h h h h m m m m m m s s s s s

Could there be a signed/unsigned problem somewhere that messes up
the required shifts? Could the MS-DOS FS expert check this out please?

Cheers,
DJ
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Analogic Corporation
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.44 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-