different times for last boot between last and uptime -s
Ralf Mardorf
kde.lists at yahoo.com
Tue Dec 6 04:03:56 UTC 2022
On Tue, 2022-12-06 at 04:24 +0100, Ralf Mardorf wrote:
> Since your RTC is at UTC, you are missing an hour as long as no service
> was started to initialize the system clock.
PS:
The system clock is a software clock, so if you start booting only the
time of the battery buffered hardware clock can be used and it is
interpreted to represent UTC, since the software clock isn't initialized
the system can't know at what timezone you are. During the startup a
service does initialize the software clock, hence later the system knows
that you are at CET and not at UTC. To avoid an 1 hour mismatch you need
to set your hardware clock to CET instead of UTC.
So again
> TimeUSec=Mon 2022-12-05 23:10:39 CET
> RTCTimeUSec=Mon 2022-12-05 23:10:40 CET
^^ ^^^
is for
RTCTimeUSec=Mon 2022-12-05 22:10:40 UTC
^^ ^^^
To avoid the mismatch it should read
TimeUSec=Mon 2022-12-05 23:10:39 CET
RTCTimeUSec=Mon 2022-12-06 00:10:40 CET
If you restart your machine and take a look at the time by the BIOS, you
will notice that the BIOS does not show Europe/Berlin time. It is 1 hour
behind. If the time in Berlin is 23:10, your BIOS does show 22:10.
You could migrate from LocalRTC=no to LocalRTC=yes and set the hardware
clock, if you shouldn't need UTC, but keep in mind that this approach
also has got serious disadvantages related to timestamps, if you e.g.
sync files by keeping files with newer timestamps and deleting files
with older timestamps changing between standard time and DST or between
timezones could cause trouble. I'm in favour of LocalRTC=yes, but I
neither sync files by a timestamp related approach, nor do I travel
through different timezones.
More information about the ubuntu-users
mailing list