-
Sync date without NTP (for BeagleBone, Pi, etc)
01/18/2016 at 19:34 • 2 commentsI live in a place protected by a HTTP Proxy, so NTP doesn't work when I want to sync date for my SBCs as they don't keep the time when turned off.
I found this command, which can be used to set the date by querying a Google server. Not so accurate as NTP but does the job.
sudo date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"
thanks for following #Rezodo: Long Range irrigation and weather station