Created
September 11, 2019 05:55
-
-
Save eliezedeck/a3259ee3d930e81e14368386561efb42 to your computer and use it in GitHub Desktop.
Set the system date using nothing but cURL (works even with broken clock, or boards without battery-powered RTC)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo date +"%d%m%Y%H%M%S" -s "$(curl -v --insecure --silent https://google.com/ 2>&1 | grep -i -E -w '^< date\:' | sed -e 's/< date: //gI')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment