date, hwclock, and timedatectl commands - something I noticed
- Anmelden oder Registrieren um Kommentare zu schreiben
Recently I've been installing Trisquel on some laptops that haven't been powered on in a long time, and so the date was set incorrectly. Editing the date and time in the GUI appears to be broken, but thanks to the manual page at < https://trisquel.info/en/wiki/set-hardware-clock >, I had no trouble changing the date and time using the command line.
I noticed something strange though. Although that manual page and a forum post at < https://trisquel.info/en/forum/time-and-date-set-change-hardware-clock-affects-other-oses > both suggest that timedatectl does not set the hardware clock, when I ran the timedatectl command, it does appear to update the hardware clock. Maybe I am misunderstanding something but it seems like the section about using the hwclock command can be removed from the manual page I mentioned earlier.
I did some tests and it seems like:
* date sets the system clock but not the hardware clock
* hwclock can copy the time from the system clock to the hardware clock, or vice versa
* timedatectl sets both the hardware clock and system clock
Additionally, I noticed hwclock needs root to even display the time, but timedatectl can display or modify the time without root.
"I've been installing Trisquel on some laptops that haven't been powered on in a long time, and so the date was set incorrectly"
That indicates that battery on the motherboard has died. It should be replaced.