different times for last boot between last and uptime -s

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Tue Dec 6 11:59:22 UTC 2022


----- On 6 Dec, 2022, at 04:24, Ubuntu-Users ML ubuntu-users at lists.ubuntu.com wrote:

> 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,

from where do you know that ?
Both timestamps say CET.

> 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.

But you have, like me, on both timestamps "CET".
Why do you believe your RTC is in CET and mine in UTC, both timestamps say CET?
I'm confused.

> 
> 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.

On one hand you say RTC is always interpreted in UTC in Linux, on the other hand you say
your battery buffered hardware clock is at german time (CET).
I'm completely confused.
Does that mean whatever timestamp the RTC has for Linux it's ALWAYS UTC ?
 
> 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
> 
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
(null)
Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH), Ingolstadter Landstr. 1, 85764 Neuherberg, www.helmholtz-munich.de. Geschaeftsfuehrung:  Prof. Dr. med. Dr. h.c. Matthias Tschoep, Kerstin Guenther, Daniela Sommer (kom.) | Aufsichtsratsvorsitzende: Prof. Dr. Veronika von Messling | Registergericht: Amtsgericht Muenchen  HRB 6466 | USt-IdNr. DE 129521671




More information about the ubuntu-users mailing list