🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.misc
Article #3139

Re: Midnight Bug

#3139
From: Kevin Spencer
Date: Thu, 16 May 1991 06:55
30 lines
2437 bytes
In article <1991May13.180754.25187@eng.ufl.edu> jy@wasp.eng.ufl.edu (Jim Yousse) writes:
>Does anyone know about the Midnight Bug in DOS, where the clock does not
>register a date change when passing midnight?  We have a user here who
>leaves her machine on continuously, and every now and then it will lose
>a day.  We're pretty sure this is the midnight bug in action.  We've heard
>of fixes for this, but don't know where to get one.  Any suggestions?
>Thanks.

This is due to DOS only setting a flag instead of incrementing a counter when
midnight is passed. ie, as the clock ticks past midnight, DOS sets a flag
indicating that it's a new day. This flag is reset, and the date incremented,
when the BIOS Get-Date function(s) are called. What this boils down to is
that, if your computer is on over an entire midnight-midnight period without
the clock being read, you will lose a day. I haven't developed a fix for this
yet, although I will need to soon as I intend to start leaving my machine on
24-hours in a few months. However, a TSR should do the trick. A simple one
which does a BIOS Get-Date call whenever the time equals a certain value (ie,
once/day) would work. This may or may not display the time/date on the screen
(depends on what you want). There are probably some PD programs around which
do just that. However, you need to make sure that they use the BIOS, rather
than direct memory reads.

PS - I'm not sure that it's a BIOD Get-Date call. It may be Get-Time instead.
	 I don't have the manuals handy.

-- 
-----------------------------------///-----------------------------------------
Kevin Spencer (09) 420 8173       /// Insert profound gem of wisdom here...
kevin@ncc.telecomwa.oz.au     \\\///
-------------------------------\XX/--------------------------------------------
Technical Details
Message-ID: <1991May16.065549.12295@nodecg.ncc.telecomwa.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!spool.mu.edu!munnari.oz.au!uniwa!nodecg!kevin
References: <1991May5.175313.21025@athena.mit.edu> <1991May7.012810.8934@serval.net.wsu.edu> <19093@sdcc6.ucsd.edu> <1991May13.180754.25187@eng.ufl.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!spool.mu.edu!munnari.oz.au!uniwa!nodecg!kevin
From: kevin@nodecg.ncc.telecomwa.oz.au (Kevin Spencer)
Newsgroups: comp.os.msdos.misc
Subject: Re: Midnight Bug
Message-ID: <1991May16.065549.12295@nodecg.ncc.telecomwa.oz.au>
Date: 16 May 91 06:55:49 GMT
References: <1991May5.175313.21025@athena.mit.edu> <1991May7.012810.8934@serval.net.wsu.edu> <19093@sdcc6.ucsd.edu> <1991May13.180754.25187@eng.ufl.edu>
Reply-To: kevin@nodecg.UUCP (Kevin Spencer)
Organization: Network Computer Centre - Telecom
Lines: 30