Re: Command to set hardware clock



On Tue, 17 Jan 2006 15:06:18 +0100 in <pan.2006.01.17.14.06.17.726727@xxxxxxxxxx> Mark South <mark.south@xxxxxxxxxxxx> wrote:
>
> I guess I didn't ask nicely enough to avoid the "you are a clueless
> newbie go read the obvious man pages" response :-)

Did you try a google search of "BSD setting cmos clock".

>
>> probably only useful via sudo or otherwise as root, though.
>
> The date man page doesn't indicate how one sets the hardware clock using
> date. If I missed it please tell me. I don't mean the system clock, that
> basically lives inside the kernel, and that doesn't run when the machine
> is turned off. I mean the battery-backed hardware clock on the
> motherboard, the one that OBSD reads at boot to set the system time from.
>
> On a portable that isn't always connected to the net, using ntpd as a
> solution doesn't work really well.

It would appear that it should be set on shutdown (since 2.5/2.6).
And if you can invoke resettodr(9) from something, you should be able
to do it an arbitrary time.


--
Chris Dukes
Suspicion breeds confidence -- Brazil
.