different times for last boot between last and uptime -s
Ralf Mardorf
kde.lists at yahoo.com
Tue Dec 6 13:12:58 UTC 2022
> > > 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
> >
> > [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
Hi,
your timezone is set to Berlin.
My timezone is set to Berlin.
Your LocalRTC setting is no.
My LocalRTC setting is yes.
At the moment our timezone Berlin is UTC +1 hour.
I know that my hardware clock (RTC) and software clock (system) are at
the same time, but RTCTimeUSec is shown to be an hour in the CET future.
If I convert this CET from the future to UTC by subtracting a hour it's
the correct time.
The command hwclock shows the correct time on my machine.
[rocketmouse at archlinux ~]$ sudo hwclock; echo "# # # #"; date; echo "# # # #"; timedatectl show --all
2022-12-06 13:50:26.827605+01:00
# # # #
Tue 6 Dec 13:50:27 CET 2022
# # # #
Timezone=Europe/Berlin
LocalRTC=yes
CanNTP=yes
NTP=no
NTPSynchronized=no
TimeUSec=Tue 2022-12-06 13:50:27 CET
RTCTimeUSec=Tue 2022-12-06 14:50:27 CET
Running an old Ubuntu install in a container...
[root at archlinux rocketmouse]# systemd-nspawn -bqD /mnt/moonstudio
[snip]
[weremouse at moonstudio ~]$ sudo hwclock; echo "# # # #"; date; echo "# # # #"; timedatectl show --all
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
# # # #
Tue Dec 6 13:57:11 CET 2022
# # # #
timedatectl: unrecognized option '--all'
...doesn't work to verify, if Ubuntu and Arch are showing the same
results, let alone that I don't know how
sudo hwclock
works, but most likely, if you reboot and take a look at the BIOS, the
time shown by the BIOS is 1 hour behind on your machine. Without doubts
the time shown by the BIOS on my machine is the correct CET time.
This reasoning makes sense, since the mismatches depending on the used
commands are +/- 1 hour on your and my machine.
On your machine the output of "last" is 1 hour behind CET, IOW it's the
correct UTC time, while on my machine the out put of "last" is exactly
CET, IOW it's not the correct UTC time, it's 1 hour in UTC future.
Regards,
Ralf
More information about the ubuntu-users
mailing list