Fix WSL2 clock skew issues⚓︎
Subject⚓︎
In WSL2 if you hibernate the Windows OS, after a WSL2 VM is started, the VM will not re-sync its time with the hardware clock. This causes issues with time sensitive protocols like TLS certificates and caching.
Fixes⚓︎
The suggested fixes to this are to either run hwclock -s
within the VMs so they manually resync, or the other option is to shutdown all the VMs at once with wsl --shutdown
and let them resync clocks on next boot.