*BSD News Article 15499


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!convex!convex!darwin.sura.net!paladin.american.edu!news.univie.ac.at!fstgds15.tu-graz.ac.at!fstgds01.tu-graz.ac.at!not-for-mail
From: chmr@edvz.tu-graz.ac.at (Christoph Robitschko)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Timezone nonsense
Date: 3 May 1993 08:55:22 +0200
Organization: Technical University of Graz, Austria
Lines: 37
Message-ID: <1s2fkqINNn0i@fstgds01.tu-graz.ac.at>
References: <1993May2.040825.6130@ucc.su.OZ.AU>
NNTP-Posting-Host: fstgds01.tu-graz.ac.at
X-Newsreader: TIN [version 1.1 PL7]

In article <1993May2.040825.6130@ucc.su.OZ.AU> David Dawes (dawes@physics.su.OZ.AU) wrote:
> In article <1runl4$f1r@wzv.win.tue.nl> guido@gvr.win.tue.nl (Guido van Rooij) writes:
> >Same happened here. See my other posting and it happened after exactly
> >199 days in the year. It is due to the (in my opinion) incorrect patch
>  ^^^
>  119

> >for clock.c (the first patch on this file). Incoreect because it leaves
> >us with 2 different places where dst is handled, and even in a different
> >way. Just uninstall this patch will do.

> Seems to me that this bit of code in clock.c should only be used if
> DST!=0, and you only set DST!=0 if your BIOS/RTC is making its own
> DST adjustment.  I don't know if that code actually works with a BIOS
> that does its own DST correction or not (mine doesn't do it).

386bsd does not allow the BIOS (actually the clock chip) to do automatic
DST adjustment. In startrtclock(), writertc(RTC_STATUSB, RTCSB_24HR) switches
the DST bit off. (This adjustment is not done the right way in the chip,
anyway).

It seems to me that this bit of code in clock.c should never be used. What we
need is a more flexible way to remember the offset between the BIOS clock and
GMT. I have modified clock.c to store the current offset in the CMOS alarm 
registers, but that doesn't look like the right place.

> Anyway, what I've done is to enclose the code in

>   if (tz.tz_dsttime) { ... }

That helps you, but it is not a general solution for DST starting on different
days.

> >-Guido

> David
							Christoph