*BSD News Article 22087


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!nigel.msen.com!math.fu-berlin.de!irz401!uriah!not-for-mail
From: j@bonnie.tcd-dresden.de (J Wunsch)
Newsgroups: comp.os.386bsd.questions
Subject: Re: date is wrong
Date: 8 Oct 1993 11:49:16 +0100
Organization: Textil Computer Design GmbH Dresden, Germany
Lines: 41
Message-ID: <293gjcINNef5@bonnie.tcd-dresden.de>
References: <28pa84$t24@Germany.EU.net>
NNTP-Posting-Host: bonnie.tcd-dresden.de

In <28pa84$t24@Germany.EU.net> bs@Germany.EU.net (Bernard Steiner) writes:

>Folks,
>I have a problem with the date (time, to be exact) on my machine.
>The kernel config says "timezone 0" which ought to yield UTC/GMT, right ?
>Now, doing a "date -u" is off one hour from the CMOS clock.

>Any idea what could be wrong ?

Having the same problem, here's a quick fix. The DST option seems to
be totally ignored till now, causing the kernel to always assume the
CMOS runs in some brain-dead variant of DST:-)

*** clock.c.dist	Sat Jun 12 16:57:48 1993
--- clock.c	Sun Oct  3 21:46:26 1993
***************
*** 205,210 ****
--- 205,211 ----
  	sec += bcd(rtcin(RTC_MIN)) * 60;			/* minutes */
  	sec += bcd(rtcin(RTC_SEC));				/* seconds */
  
+ #if DST
  	/* XXX off by one? Need to calculate DST on SUNDAY */
  	/* Perhaps we should have the RTC hold GMT time to save */
  	/* us the bother of converting. */
***************
*** 212,217 ****
--- 213,220 ----
  	if ((yd >= DAYST) && ( yd <= DAYEN)) {
  		sec -= 60*60;
  	}
+ #endif /* DST */
+ 
  	sec += tz.tz_minuteswest * 60;
  
  	time.tv_sec = sec;
-- 
in real life: J"org Wunsch |   )  o o  | primary: joerg_wunsch@tcd-dresden.de
above 1.8 MHz:   DL 8 DTL  |    )  |   | private: joerg_wunsch@uriah.sax.de
                           | . * ) ==  |
          ``An elephant is a mouse with an operating system.''