Updating and displaying CMOS clock

Ralf Mardorf ralf.mardorf at rocketmail.com
Mon Jul 7 05:44:13 UTC 2014

On Mon, 2014-07-07 at 11:57 +0700, Victor Sudakov wrote:
> Olivier Nicole wrote:
> > If all you need is a daily update, why not a cron to restart ntp once
> > a day?

The OP ask for a command like Liunx's hwclock, to set up the RTC.

I for example on Linux do it like that:

$ cat /usr/local/bin/tool 
            ntpdate ntp.favey.ch
            hwclock --set --date "$(date)";;

> Because no matter how often you restart ntp, it does not update the
> CMOS (hardware) clock.
> My question was about updating the CMOS clock.

"In the last episode (Mar 10), Kelly Jones said:
> What are the FreeBSD equivalents of hwclock (view/set the BIOS
> hardware clock) and adjtimex (adjust clock speed)? I couldn't find
> these two well-known Linux commands in ports?

FreeBSD sets the hardware clock whenever settimeofday() is called
(unless the sysctl machdep.disable_rtc_set is set). I don't think
there's a way to retrieve the current hardware clock settings from

Linux's adjtimex(2) is called ntp_adjtime(2) in FreeBSD." -


More information about the freebsd-questions mailing list