[SOLVED] 2FA codes are generated incorrectly

Since the codes, according to several forum posts, are based on UTC time, I don’t understand why they are wrong.
On my host, as well as in the Docker container, the time is completely set correctly.
ntpdate did not help but rather made things worse.
The time was no longer correct with ntpdate. (Wrong day and wrong time) Furthermore it also destroyed my systemd.resolved.
I have now already tried several hours to fix it, unfortunately I have not managed it and in google I could not find anything more.

root@pi:~# date
Sun Sep 25 12:50:59 CEST 2022
root@pi:~# timedatectl
               Local time: Sun 2022-09-25 12:51:03 CEST
           Universal time: Sun 2022-09-25 10:51:03 UTC
                 RTC time: n/a
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no
root@pi:~#

I’ve fixed it. For those who also have the problem.

I’ve installed systemd-timesyncd and after that I enabled the time synchronization timedatectl set-ntp true.

It should now look like this:

pi@pi:~$ timedatectl
               Local time: Sun 2022-09-25 15:26:33 CEST
           Universal time: Sun 2022-09-25 13:26:33 UTC
                 RTC time: n/a
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
pi@pi:~$

Before it looked like this:

System clock synchronized: no
              NTP service: n/a

And in Vaultwarden so:


And my PC clock was wrong, stupidly I have oriented myself to this one. :sweat_smile: :joy:
So what do we learn from this: check several clocks.