From owner-freebsd-current Thu Feb 6 2:44:33 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED9037B401 for ; Thu, 6 Feb 2003 02:44:32 -0800 (PST) Received: from critter.freebsd.dk (esplanaden.cybercity.dk [212.242.40.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78A2C43FE3 for ; Thu, 6 Feb 2003 02:44:30 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h16AiTaW001270; Thu, 6 Feb 2003 11:44:29 +0100 (CET) (envelope-from phk@freebsd.org) To: "Andrey A. Chernov" Cc: Bruce Evans , current@freebsd.org Subject: Re: Wrong date for DEVFS entries From: phk@freebsd.org In-Reply-To: Your message of "Thu, 06 Feb 2003 13:31:45 +0300." <20030206103144.GB12538@nagual.pp.ru> Date: Thu, 06 Feb 2003 11:44:29 +0100 Message-ID: <1269.1044528269@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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