Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

File date bug in MS Network Client 3.0 (Miscellaneous)

posted by rr(R) Homepage E-mail, Berlin, Germany, 02.09.2007, 18:46

While moving data from old ThinkPad 770 to my new Evo N620c laptop I noticed a strange thing: Whenever copying (COPY, XCOPY, VC) a file with date "xxxx-01-01" (YYYY-MM-DD) from a network share its date becomes "adjusted" to "xxxx-13-01" (Do we have a 13th month, that I didn't know off? :-D). I wrote a small test tool in Turbo Pascal, which uses GetFTime to demonstrate this behaviour.

Here's the "packed" time result:

register DX (incorrect):
FEDCBA9 8765 43210  bit
0011010 1101 00001  value
2006 years (1980+26)
        13 months (?!)
             1 day

register CX (correct):
FEDCB A98765 43210  bit
01111 001101 00110  value
15 hours
      13 minutes
             12 seconds (6*2)

It's not a Y2K problem, because it also happens with older dates. This DOS function is involved:

Explanations are welcome! :-) It's a little hard to debug this monster.


Complete thread:

Back to the forum
Board view  Mix view
15297 Postings in 1378 Threads, 254 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum