Sometimes the system clock in WSL2 can get out of sync with the actual time / hardware clock. Particularly after sleep or hibernate
By adding this to your .bashrc, you can keep your WSL2 instance up to date w/o needing to invoke sudo hwclock -s
, scheduling tasks, or otherwise
This is terrible and you probably shouldn't use this.
Thanks @MetricMike! Yeah, terrible idea, no one should do this 😆 thanks for the heads up on command changes
I had completely forgotten about this gist. These days I'd probably point people to https://github.com/stuartleeks/wsl-clock as well as jump in on Issues on https://github.com/microsoft/WSL in hopes of a proper fix