*BSD News Article 11737


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA2052 ; Thu, 25 Feb 93 10:09:53 EST
Newsgroups: comp.os.386bsd.misc
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!email!vlsivie!volker
From: volker@vlsivie.tuwien.ac.at (Volker Hamann)
Subject: Re: bsd has wrong date (-1 day)
Message-ID: <1993Feb23.194447.27456@email.tuwien.ac.at>
Keywords: help date time day
Sender: news@email.tuwien.ac.at
Nntp-Posting-Host: cuba.vlsivie.tuwien.ac.at
Reply-To: volker@vlsivie.tuwien.ac.at (Volker Hamann)
Organization: Technical University of Vienna
References: <hg926cy.730393047@unidui>
Date: Tue, 23 Feb 1993 19:44:47 GMT
Lines: 41

In <hg926cy.730393047@unidui> hg926cy@unidui.uni-duisburg.de (Cyrus) writes:

>Is it a kown problem?:
>After every boot I have to fix the date to the current.
>It's always one day back.
>But the CMOS has the right date.
>Any hints?

>regards, Ulrich
>-- 
>----------------------------------------------------------------------
>Ulrich Cyrus				hg926cy@unidui.uni-duisburg.de
>Fliederstr. 169
>D-47055 Duisburg 			
>Germany

When I installed 386BSD, I had exactly the same problem, and it remained
after I rebuilt the kernel with the correct timezone (here it is GMT+1).
After searching around in the kernel sources I found a file
dealing with the battery-powered clock. I can't exactly remember where it
was, but I think, it was /usr/sys/sys.386bsd/i386/isa/clock.c
There was a line like

    seconds -= seconds * 24 * 60 * 60;    /* XXX - don't know why */

- the comment is really there. This line obviously subtracts exactly one
day from the current time.

All I had to do was commenting this line, rebuild the kernel and off we go!

If the file is not the correct one, don't kill me!

Regards,

	Volker

--
|   /| ! Volker Hamann              ! Email: volker@vlsivie.tuwien.ac.at
|  / | ! Department for VLSI Design ! Phone: (++43 1) 58801-8142
|-/--| ! University of Technology   ! Fax:   (++43 1) 569697
|/   | ! Vienna, Austria              "IS THERE ANYBODY OUT THERE?"