Date: Wed, 17 Dec 1997 12:00:58 +0200 (IST) From: Eli Zaretskii To: Dim Zegebart cc: DJGPP Mail List Subject: Re: Time and Date problem In-Reply-To: <349622D3.1E4C@post.comstar.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 16 Dec 1997, Dim Zegebart wrote: > And then call settime() to synchronize real and system timers. > > { struct time now; > real_time_clock(0,&now); > settime(&now); > } > Everething is Ok until midnight - then time is 0:0:0 settime() increase > the date but then the time become 0:0:1 it sets date to the old > value :( What is my problem and how can I solve it ? I'm not sure what problem are you trying to solve with the above code. AFAIK, in DOS 3.3 and later, `settime' will also set the time maintained in the CMOS clock. So your code is constantly slowing down the system clock (due to the time that passes between the two calls). It's probably not what you want, and it even might be the reason behind the strange effects around midnight. I suggest to try the BIOS call for setting the system time instead (either the Borland-like `biostime' or the MS-like `_bios_timeofday' function).