[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting system/ rtc clock



On Sun 18 Sep 2022 at 15:31:49 (-0500), Richard Schires wrote:
> I've been searching for an answer and keep going in a circle.
> I hope you can help or direct me to someone who can. I am new to Linux.
> I am using an HP ML150 G2 to run a tabletop CNC mill. The software is
> LinuxCNC on Debian. The problem that I am trying to resolve is getting the
> system clock and CMOS clock to match.
> If I set the time in the CMOS, reboot, the system time is five hours off.
> I can get the system clock set through the date command;
> sudo date -s "D M Y H:M:S"
> Problem is that resets the CMOS time way off.

Yes, it sets it to UTC. If you can persuade yourself that running
the CMOS clock on UTC is sensible, then just stick with that.
It makes life a lot simpler (no clock changes in spring and fall).

> I've tried using hwclock -w to write the system time to CMOS but doesn't
> work.
> I know I could just keep the system time and ignore the CMOS time but
> should be able to get the two to match.
> Would appreciate your help or direction.

Or you might want to explain why the CMOS time needs to be Local time,
which gets adjusted whenever the clocks change or you travel.

Cheers,
David.


Reply to: