Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucselx!petunia!csuchico.edu!madams From: madams@ecst.csuchico.edu (Michael E. Adams) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: DOS and BIOS clocks Message-ID: <1991Jan04.111828.12689@ecst.csuchico.edu> Date: 4 Jan 91 11:18:28 GMT References: Sender: news@ecst.csuchico.edu (USENET) Organization: California State University, Chico Lines: 40 I'm no pro on this but I do remember a few things that might help. When DOS is booted, it gets the time and date from the CMOS clock. Or, if "time" is in the autoexec.bat file, then it prompts the user to input the time. In either case, DOS keeps a copy of the time/date in it's own working area & updates it by itself. When the DOS clock hits midnight a flag is set & the DOS date is advanced. The problem for machines that are left running is that, DOS can only "see" one midnight! So if you boot your machine on Friday morning, DOS will roll the date that night, but DOS will be two days short on Monday morning! The other problem is that some OEM DOS versions, like the one that came with my Epson, failed to check the midnight flag. Thus, the DOS date is not advanced at all. Remember, the CMOS clock is still running correctly, so when you reboot your machine DOS resets with the right time & date. When I bought my Epson I thought it was defective because of this date roll over problem. I found that a new DOS cleared up the symptoms. I first noticed this bug in 1986 when I started using the Make utility from MS 'C'. "Make" checks the date stamp on source files to see if they need to be re-compiled. I work late nights at home and so I frequently compile a program at around 11:30 pm, make changes to the source files, and then recompile sometime after midnight. Without a correct date roll over, the "Make" utility can not determine whether or not the source file is newer than the compiled version, and I end up spending hours looking for fixed bugs! Note: All of Borlands IDE Makes use file date stamps also. (___) | Michael E. Adams (o o) | Custom Computer Programming /-------\ / | P.O. Box 5027 / | ||O | Chico, California 95927-5025 U.S.A. * ||,---|| | ~~ ~~ | internet: madams@cscihp.ecst.csuchico.edu No BULL bandwidth |