Skip to content

Instantly share code, notes, and snippets.

@eliezedeck
Created September 11, 2019 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliezedeck/a3259ee3d930e81e14368386561efb42 to your computer and use it in GitHub Desktop.
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)
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