Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jan 2002 10:44:07 -0500 (EST)
From:      Marco Radzinschi <marco@radzinschi.com>
To:        Cliff Sarginson <cliff@raggedclown.net>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: How to change a FreeBSD clock time
Message-ID:  <20020120103537.M1868-100000@mail.radzinschi.com>
In-Reply-To: <20020120071937.GA1341@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 20 Jan 2002, Cliff Sarginson wrote:

> 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

	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




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