different times for last boot between last and uptime -s

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Mon Dec 5 22:38:26 UTC 2022


----- On 5 Dec, 2022, at 19:50, Tom Mitchell niftyubuntu at niftyegg.com wrote:

> 
> Two details come to mind.
> *) Time zone for the system and for the user could be mismatched.
> *) mismatch of hardware real time clock setup or absence of a RTC.

RTC is correct:
root at crispor-server:~# date
Mon 05 Dec 2022 11:14:30 PM CET
root at crispor-server:~# hwclock
2022-12-05 23:14:35.384960+01:00
root at crispor-server:~#

Machine is a Virtual Machine (KVM/Qemu).
It has a RTC:

ha-idg-2:~ # ps aux|grep crispor

qemu     26427 14.4 13.2 29658984 24078068 ?   Sl   Dec02 634:14 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name guest=vm-crispor-server, ... 
====> -rtc base=localtime <==== ...
> System boot is recorded early and then time management tools like NTP start.
Yes, but RTC is the same as system.

> $ timedatectl show --all
> $ echo $TZ

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
root at crispor-server:~#
root at crispor-server:~# echo $TZ

root at crispor-server:~# 
root at crispor-server:~# TZ='Europe/Berlin'; export TZ
root at crispor-server:~# echo $TZ
Europe/Berlin

Unfortunately this doesn't fix the difference. 

Bernd
(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