Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : QWHITE13.ZIP

Output of file : MIDNIGHT.TEC contained in archive : QWHITE13.ZIP

ID:MI Date Not Changing at 12:00am
Quarterdeck Technical Note #176 Filename: MIDNIGHT.TEC
by Daniel Travison CompuServe: MIDNIG.TEC
Last revised: 2/06/92 Category: DV

Subject: Due to quirks in DOS, the system date will frequently fail to advance
at midnight when applications are running under DESQview. This note
explains the causes of the problem, and suggests some potential

Periodically, a DESQview user who keeps his system on over a 24-hour period
will discover that the system date did not change at midnight. Although this
might appear to be a problem with DESQview, it is really a problem caused by
an application. The way DOS determines if the date has rolled over is by
making a call to interrupt 1Ah using function 0.

One piece of information returned is the number of times the date has rolled
over since the last time the call was made. The call ALSO resets the flag
that indicates the date has rolled over to 0. The problem occurs when an
application makes this call before DOS gets a chance to see the date
rollover. The flag gets reset to zero and DOS does not change the date.

A second problem that can occur is due to a bug in DOS. DOS considers the
above flag as an indication that the date changed. Many BIOSes, however, use
this flag to count how many times the date has changed. If you were to leave
your system running over the weekend and none of the applications running
asked DOS for the date, when you come back to the system Monday morning, the
system date would not be correct.

For example:

When you turn the system on Friday, this flag is set to zero
Saturday morning, the flag gets set to 1
Sunday morning, the flag is set to 2
Monday morning, the flag is set to 3
Monday morning you type DATE at a DOS prompt, the date will set
for Saturday instead of Monday.

DOS simply checks to see if the flag is not 0, and increments the Date instead
of seeing what the flag's value is and adjusting the date based on that value.

The solution to the problem is to run a program that asks DOS for the date.
One of the programs on Quarterdeck's BBS is called DVTIME.COM. This program
simply asks DOS for the date and time once a second and displays it in a
small DESQview window. It is written to make use of DESQview's Timer Object
which allows it to have DESQview wake it up, read the time, and go back to
sleep. This might be just the program you need if you are allowing your
system to run over extended periods of time and experience the above problem.

The file you need to download is DVTIME.ZIP. It contains both the DVTIME.COM
program and the PIF to set it up in DESQview. Our BBS Number is 310-314-3227.

*This technical note may be copied and distributed freely as long as it*
*is distributed in its entirety and it is not distributed for profit. *
* Copyright (C) 1990-2 by Quarterdeck Office Systems *
************************ E N D O F F I L E *************************