01/18/2016 at 19:34 •
I 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')"