Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jan 2002 08:19:37 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        freebsd-questions@FreeBSD.org
Subject:   Re: How to change a FreeBSD clock time
Message-ID:  <20020120071937.GA1341@raggedclown.net>
In-Reply-To: <ydwuydpqqi.uyd@localhost.localdomain>
References:  <002501c1a0d2$6682a9a0$0301a8c0@wintellect.com> <20020119102526.GA5105@raggedclown.net> <uek7ueqieq.7ue@localhost.localdomain> <20020120110618.U60575@wantadilla.lemis.com> <ydwuydpqqi.uyd@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 19, 2002 at 08:53:57PM -0800, Gary W. Swearingen wrote:
> Greg Lehey <grog@FreeBSD.org> 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



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




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