Skip to content

WSL2 Clock Skewing⚓︎

Issue⚓︎

Within WSL2 VMs their clocks may stop updating if the host OS is put in to hibernation. If the clocks skew too far this can cause issues with certificate validation due to incorrect times, or caching issues where files are no longer seen as valid.

apt upgrade error⚓︎

When trying to run apt update on an ubuntu image the clock had skewed enough that I could not update.

Text Only
1
2
3
E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 9h 44min 24s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 9h 45min 39s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 9h 47min 11s). Updates for this repository will not be applied.

Fix⚓︎

Text Only
1
2
3
4
5
# date
Thu Jan 26 21:25:13 MST 2023
# hwclock -s
# date
Fri Jan 27 08:13:44 MST 2023

References⚓︎