Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 1997 22:14:16 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        "Ronald F. Guilmette" <rfg@monkeys.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Setting the CMOS clock... How?
Message-ID:  <Pine.BSF.3.96.970922220949.6177b-100000@gdi.uoregon.edu>
In-Reply-To: <5589.874974449@monkeys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Sep 1997, Ronald F. Guilmette wrote:

> 
> Greetings again folks.  I hope that I haven't used up my quota of questions
> yet.
> 
> This time I _do_ have one that I would have thought would have been an
> FAQ... for the questions list anyway... so I did a search in the online
> archives of the questions list, but I still came up empty.
> 
> On Linux, there is a program called /sbin/clock which can be used to
> set the standard x86 system ``CMOS time-of-day clock'' from the kernel's
> current time-of-day value or vise versa.
> 
> Try as I might, I can't seem to find the thing that (under FreeBSD)
> performs the same function.  Is there such a thing?  If so, where do
> I find it?

date(8) takes care of it.  FreeBSD will convert the time given to the
proper format to store it in the CMOS clock, depending if you're using it
at UTC or not.   In short:  date(8) will DTRT.

> P.S.  In all truth, I'm not even 100% sure what the Linux manpage for
> /sbin/clock is referring to when it says ``CMOS clock''.  Is that what
> the FreeBSD 2.2.2 clocks(7) manpage calls the ``mc14618a clock''?  Or
> is it the thing that the FreeBSD manpage calls the ``i8254 clock''?

Those clocks are timing clocks (pulses) for the CPU, not the CMOS clock
which stores the current date and time.  Basically, it's for information
and internal kernel usage only.

The topic of computer timekeeping is pretty fascinating and is riddled
with bad quality caused by cheap crystals.  I can provide URLs to pages
about timekeeping if you're interested :)

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major
Spam routed to /dev/null by Procmail    | Death to Cyberpromo




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970922220949.6177b-100000>