Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!pyrnj!mirror!xanth!john From: john@xanth.UUCP (John Owens) Newsgroups: comp.sys.ibm.pc Subject: Re: Date not advancing at midnight on my clone Message-ID: <720@xanth.UUCP> Date: Thu, 19-Mar-87 01:12:16 EST Article-I.D.: xanth.720 Posted: Thu Mar 19 01:12:16 1987 Date-Received: Sat, 21-Mar-87 02:48:59 EST References: <4728@shemp.ucla-cs.UCLA.EDU> <4740007@hpvcla.HP.COM> Organization: Old Dominion University, Norfolk Va. Lines: 43 Summary: The Real Story - multiple compounding bugs Well, I thought I had explained this at length some time ago, but I can't find the article, so.... There is a mis-design in IBM's BIOS, both XT and AT, such that when the time-of-day clock passes midnight, the date wrap flag is *set*. This gives no indication of how many days have passed, just that *at least one* has passed. Once the time is read, which returns this flag in a register, the flag is cleared. These have been propagated for the sake of compatibility. So, DOS would need to read the time at least once a day, or lose days. So far, so good, but there was another bug in the device drivers supplied to IBM by Microsoft. It would read the clock to decide whether or not a disk might have been changed, but it would not note the setting of the date-changed flag, so the fact that this flag had been set would be lost. The next time that the clock driver checks, the flag isn't set, so the date doesn't get changed. This bug was fixed a while back. I'm not sure what version, but certainly the 3's would have it. So much for the "lose date change while accessing floppies at midnight bug", but that still leaves the "multiple date rollover bug", wherein you leave your system idle, over a weekend, say, and the flag gets set several times. You come back in on Monday, create a file or somesuch, and it says "Oh - the midnight flag! It must be Saturday now!" This still exists in PC-DOS 3.2, the "generic" "retail" MS-DOS 3.2, and the MS-DOS 3.2 OEM kit. *However*, Microsoft does have a fix for the problem, but it turns out that the fix breaks something to do with the runtimes for the BASIC Compiler, so they took it out. I would not be at all surprised if various OEMs got the original fix or wrote their own.... Disclaimer: All this was discovered through unconscious psychic communication with the MS-DOS systems software group, and I take no responsibility for the implications of its correspondence to the real world. (Whatever that is.) -- John Owens Old Dominion University - Norfolk, Virginia, USA john@ODU.EDU old arpa: john%odu.edu@RELAY.CS.NET +1 804 440 3915 old uucp: {seismo,harvard,sun,hoptoad}!xanth!john