udev
creates a symlink between /dev/rtc
and
the default RTC device. That can be manually overriden as follows:
$ ln -sf /dev/rtc1 /dev/rtc
$ timedatectl
Local time: Fri 2023-02-10 12:45:03 UTC
Universal time: Fri 2023-02-10 12:45:03 UTC
RTC time: Sat 2000-01-01 00:00:00
Time zone: Universal (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
$ ln -sf /dev/rtc0 /dev/rtc
$ timedatectl
Local time: Fri 2023-02-10 12:45:22 UTC
Universal time: Fri 2023-02-10 12:45:22 UTC
RTC time: Fri 2023-02-10 12:45:21
Time zone: Universal (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Note that hwclock
requires the -f
flag to
specify the RTC device. It is hardcoded to default to
/dev/rtc0
and will not read /dev/rtc
.