Hello,
I read this, but I don't understand what to do
https://forum.artixlinux.org/index.php/topic,1335.msg9312.html#msg9312
https://forum.artixlinux.org/index.php/topic,1311.0.html
https://forum.artixlinux.org/index.php/topic,1311.msg9306.html#msg9306
https://forum.artixlinux.org/index.php/topic,1311.msg9317.html#msg9317
https://github.com/karelzak/util-linux/commit/cd781c405be82540484da3bfe3d3f17a39b8eb5c
-------------------------------------
My clock in Bios show the real time. The Systemtime show 2 h later.
I have no MS-Windows installed. Dualboot with MX Linux.
On boot there is shown (with the right time 11:51)
/var/log/rc.log
rc default logging started at Mon Jun 14 11:51:26 2021
* WARNING: clock skew detected!
After boot
xmg:[me]:~$ sudo hwclock --show
[sudo] Passwort für me:
2021-06-14 14:05:37.577224+02:00
xmg:[me]:~$ sudo hwclock --systohc
[sudo] Passwort für me:
xmg:[me]:~$
Here I found 2 options to use the Hardware clock. The kernel method I am afraid and not able to test.
https://wiki.gentoo.org/wiki/System_time#Hardware_clock
https://wiki.gentoo.org/wiki/System_time#OpenRC_2
The original /etc/conf.d/hwclock (without comments)
clock="UTC"
#clock_hctosys="YES"
#clock_systohc="YES"
clock_args=""
1. Step set clock="local" -> reboot -> nothing changed
2. Step set
#clock="UTC"
clock_hctosys="YES"
clock_systohc="YES"
xmg:[me]:~$ sudo rc-service hwclock restart
[sudo] Passwort für me:
hwclock | * WARNING: you are stopping a boot service
hwclock | * Setting hardware clock using the system clock [UTC] ... [ ok ]
hwclock | * Setting system clock using the hardware clock [UTC] ... [ ok ]
xmg:[me]:~$ sudo rc-update add hwclock boot
* rc-update: hwclock already installed in runlevel `boot'; skipping
xmg:[me]:~$
-> reboot -> nothing change
Thx for help TM
After you set clock="local" and then reboot, during the reboot, hwclock script stores the wrong time to you BIOS clock. You need to enter BIOS setup after that and correct the clock. You need to do this only once, after that everything should work fine (until you reinstall linux and change this option again).
Thank you very much VictorBrand.
You made my day. I tryed to fix the problems many hours, and now the solution ist so simple. What a shame ;)
I use this to manually set the BIOS clock:
alias ntpsync='doas ntpdate -b pool.ntp.org; doas hwclock -w'
Usually chrony does the trick, however. If you use sudo instead of doas, substitute that in the alias.
A little update.
I made some research an find out how to use the npd instead of local time.
So I guess, I dont' have to change the hw clock in Bios, when change the summertime in Europe.
This seems more comfortable.
I found in Gentoo Wiki, how to use this option. https://wiki.gentoo.org/wiki/OpenNTPD#OpenRC
I run:
sudo /etc/init.d/ntpd start
rc-update add ntpd default