From owner-freebsd-questions Sun Jan 20 7:44:35 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.radzinschi.com (pcp284510pcs.owngsm01.md.comcast.net [68.54.240.17]) by hub.freebsd.org (Postfix) with ESMTP id C77D837B405 for ; Sun, 20 Jan 2002 07:44:29 -0800 (PST) Received: from localhost (marco@localhost.radzinschi.com [127.0.0.1]) by mail.radzinschi.com (8.11.6/8.11.6) with ESMTP id g0KFi7X01895; Sun, 20 Jan 2002 10:44:11 -0500 (EST) (envelope-from marco@radzinschi.com) Date: Sun, 20 Jan 2002 10:44:07 -0500 (EST) From: Marco Radzinschi To: Cliff Sarginson Cc: Subject: Re: How to change a FreeBSD clock time In-Reply-To: <20020120071937.GA1341@raggedclown.net> Message-ID: <20020120103537.M1868-100000@mail.radzinschi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 20 Jan 2002, Cliff Sarginson wrote: > On Sat, Jan 19, 2002 at 08:53:57PM -0800, Gary W. Swearingen wrote: > > Greg Lehey writes: > > > > > date(1). Why would you ever want to change the processor time and not > > > the CMOS time? The CMOS clock is only a backup for the processor > > > clock. > > > > Maybe because the OS I use 90% of the time maintains an offset between > > the CMOS clock and the OS clock using a sophisticated clock speed > > estimation algorithm which is not sophisticated enough to handle big > > step changes in the CMOS clock done by other OSes between boots without > > being told about it? > > > > That's not my current situation as I dropped Linux cold Turkey and the > > clock speed program isn't supported for FreeBSD. I'm OK with the "date" > > method, but I"m not happy that the "date" man page doesn't say what > > the command does better than it does. (It says "date will set the date > > and time" and doesn't mention CMOS/MB or OS clocks.) I've added it to > > my list of PRs to be written. > > > I run both Linux and FreeBSD. > As a consequence of this thread I just re-read the Linux manual page > on "hwclock". If ever a PR needs raising on something it is to provide > a manual page in Linux to explain the manual page on "hwclock" :). > > FreeBSD "date" is the Unix date command, as with so many things tracing > it's inheritance back to the beginnings of Unix itself. > > Linux uses GNU's date program, and buried somewhere in the "info" > page on Gnu date you will just about be able to work out that you > can set the system date/time with it as well as the kernel's. > > I think it is interesting that someone says a PR should be raised > against something in FreeBSD, that is the same in all Unix systems > but is different in Linux. What is probably the problem here is that > coming from Linux to FreeBSD carries with it the assumption, perhaps > understandably, that somehow everything on both systems is sort of the > same. What is called for is probably not a PR for the date page, but > someone to create some kind of brief list of surprises for Linux users > coming to FreeBSD. It would have never have occurred to me that a Linux > user would not know about the "date" command, but that is because I > have worked on Unix systems for a long time. When I first started > looking at Linux this hwclock stuff suprised me ! > > I think one of the writers was referring also to Windows, and yes it > is a real pain running Windows/FreeBSD/Linux on the same computer. Not > only for this reason but more because Windows does not understand the concept > of a hardware clock set to UTC (at least if it does I have never seen how to > make it do so and get the local time right). > > Btw "apropos time" does throw up the "date" command. > > -- > Regards > Cliff I actually considered hwclock to be strange as well, but it isn't only strange coming from Unix, it strange coming from DOS as well! :-) I was under the impression that Windows NT stored all date/time flags in the system in UTC, and then converts to the current time zone of the system when the information needs to be displayed. It seems rather ridiculous to not store the CMOS time in UTC, since it would then need to convert to UTC to store file access times, and then convert back to the system's time zone when the user issues a command such as "dir." - Marco Radzinschi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message