0

I'm on Lubuntu Focal.

Hardwaretime shows correct but in my desktop the clock is 2 hours later.

hwclock --verbose
hwclock from util-linux 2.34
System Time: 1618052149.196788
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1617960063 seconds after 1969
Last calibration done at 1617960063 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2021/04/10 10:55:51 #correct time
Hw clock time : 2021/04/10 10:55:51 = 1618052151 seconds since 1969
Time since last adjustment is 92088 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2021-04-10 12:55:50.014897+02:00

With timedatectl:

 timedatectl status
               Local time: Sa 2021-04-10 12:57:51 CEST #wrong time
           Universal time: Sa 2021-04-10 10:57:51 UTC 
                 RTC time: Sa 2021-04-10 10:57:51     
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no                         
              NTP service: inactive                   
          RTC in local TZ: no                         

Reconfiguring tzdata did not help; the timezone is correct set.

Also tried:

timedatectl set-local-rtc 0

.. not helping, but maybe I understood manpage wrong.

Kernel:

uname -r
5.4.0-70-generic

Note dualboot with debian no windows present.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
nobody
  • 5,149
  • 5
  • 22
  • 43

1 Answers1

1

By default Ubuntu expects your hardware clock to run on UTC and calculates your localtime based on that.

See How to tell Ubuntu that hardware clock is local time? if you don't want that. Note that in this case Ubuntu doesn't adjust the clock for daylight saving time.

It's usually better to use UTC for the hardware clock (unless you need e.g. to dualboot a system that doesn't support that, like some old Windows versions).

Florian Diesch
  • 86,013
  • 17
  • 224
  • 214