Can't update OSMC after half a year of lack of usage

I haven’t used my RPI4 TV-set since December, so I have August OSMC version there.

I connected it again and trying to update it.

However, I receive an error from the Kodi interface (which I can’t fully see) and from the SSH I get:

 sudo apt update
Get:1 http://security.debian.org bullseye-security InRelease [48.4 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Err:4 https://ftp.fau.de/osmc/osmc/apt bullseye InRelease    
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 131.188.12.211 443]
Reading package lists... Done                
E: Release file for http://security.debian.org/dists/bullseye-security/InRelease is not valid yet (invalid for another 255d 18h 8min 47s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 151d 7h 4min 27s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 255d 20h 54min 35s). Updates for this repository will not be applied.

Is it possible to fix without a full reinstall? I have some custom settings there which I would like to preserve.

Hard to tell without full logs. Usually when a certificate fails, it’s time and date related.

Check time and date are set correctly on your system.

Indeed, it seems that ntp syncs only on reboots and I added new wifi settings only after. After restoring the time update works. Thank you!

It will sync after connecting but it can take a bit of time. If you reboot it will also use our HTTP time service which will get you a lock-on more quickly.