site  contact  subhomenews

Hardware clock set to local-time or UTC now hardware-profiled

July 15, 2022 — BarryK

An important feature of EasyOS is "hardware profiling", so that when on a USB-stick that is booted on different computers, different video, audio, etc hardware is detected and remembered.

One thing missing, that I have been meaning to do for a long time, is /etc/clock, which specifies whether the hardware-clock is set to local-time or UTC. This can be set in QuickSetup (Setup menu), also via clicking on the time-applet in the tray. However, if you take the USB-stick and bootup on a different computer, its hardware-clock might be set differently, and the time in the tray will be wrong.

Sure, you can click on the time-applet in the tray, and change to whether the hardware-clock is local-time or UTC, but then it will be wrong again when you bootup on the previous computer.

I have edited /etc/rc.d/, /usr/sbin/quicksetup and /usr/sbin/delayedrun. /etc/clock is now backed up as /etc/clock.<hardware-profile>, so if you bootup on a different computer that will have a different hardware-profile, so /etc/clock.<hardware-profile> doesn't exist, then /usr/sbin/set_hwclock_type will run, and /etc/clock.<hardware-profile> for the current computer will be created.

What will happen in the future, at bootup, will copy /etc/clock.<hardware-profile> to /etc/clock, and all is well.   

Tags: easy