different times for last boot between last and uptime -s
Ralf Mardorf
kde.lists at yahoo.com
Tue Dec 6 03:24:19 UTC 2022
On Mon, 2022-12-05 at 23:38 +0100, Lentes, Bernd wrote:
> root at crispor-server:~# timedatectl show --all
> Timezone=Europe/Berlin
> LocalRTC=no
> CanNTP=no
> NTP=no
> NTPSynchronized=yes
> TimeUSec=Mon 2022-12-05 23:10:39 CET
> RTCTimeUSec=Mon 2022-12-05 23:10:40 CET
Hi,
here is your missing hour, your computer's hardware clock is at UTC,
while Germany is at UTC +0100.
Your RTC does report 23:10:40 CET, the culprit is CET, hence in UTC it
is 23:10 -0100 = 22:10. Actually your hardware clock is set to UTC, 1
hour behind CET.
[rocketmouse at archlinux ~]$ date; echo "# # # #"; timedatectl show --all
Tue 6 Dec 03:46:08 CET 2022
# # # #
Timezone=Europe/Berlin
LocalRTC=yes
CanNTP=yes
NTP=no
NTPSynchronized=no
TimeUSec=Tue 2022-12-06 03:46:08 CET
RTCTimeUSec=Tue 2022-12-06 04:46:07 CET
My battery buffered hardware clock is not using UTC, it's at German
time, hence the real time clock is reported to be 1 hour in the future
on my machine, but actually it isn't 1 hour in the future. On my RTC it
is _not_ 04:46, it is 03:46, too.
You need to read it like this
RTCTimeUSec=Tue 2022-12-06 04:46:07 CET
^^^
In other words it's CET -0100 = 03:46, this is because Linux does
interpret the hardware clock always to be in UTC, never in CET.
For more than a decade I'm preaching the advantages of setting the real
time clock of a desktop PC to local time instead of UTC, since the
disadvantages usually don't matter at all for a desktop PC.
Since your RTC is at UTC, you are missing an hour as long as no service
was started to initialize the system clock.
Btw. I manually set my software and hardware clock by using the obsolete
ntpdate.
ntpdate 0.de.pool.ntp.org && hwclock --set --date "$(date "+%a %b %d %Y %r")"
Regards,
Ralf
More information about the ubuntu-users
mailing list