Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Feb 2003 11:44:29 +0100
From:      phk@freebsd.org
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Bruce Evans <bde@zeta.org.au>, current@freebsd.org
Subject:   Re: Wrong date for DEVFS entries 
Message-ID:  <1269.1044528269@critter.freebsd.dk>
In-Reply-To: Your message of "Thu, 06 Feb 2003 13:31:45 %2B0300." <20030206103144.GB12538@nagual.pp.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030206103144.GB12538@nagual.pp.ru>, "Andrey A. Chernov" writes:


>> This is not any different from any other filesystem.
>
>No, it IS different - no real filesystems mounted at this point yet, so no 
>real timestamps damaged. 

Think diskless NFS, think MD(4) based root, think...

The only problem is that we set the kernel time wrong from the RTC.

We should stop doing that, rather than invent bandaids and hacks to
restore the damage it does.

I avoid it entirely by using UTC time in my RTC, but this is not an
option for machines which have to boot broken-as-designed OSs.

The most practical way to do it right would be to have adjkerntz
update a file under /boot/ ("/boot/timezone.hint") which the loader
reads in and passes to the kernel, so that the kernel can set the
time right from the RTC based on that.  This doesn't work well for
machines which are turned off for long periods of time unless the
file contains predicted DST transitions for the next year or so.

The most correct solution would be for the loader (preferably) or
the kernel to know about timezones, including DST, so that it
would also work correct for a machine which has been powered off
for half a year.  (I'd prefer the loader because we don't need
this code once userland can take over.)

I don't know if modern bios's know about timezones and DST, I've
seen some that has setup functions for it, but I don't know
if there is any way to find the information they store and I don't
think such features are widespread.

Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1269.1044528269>