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')"
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
That's definitely a hack.
Are you sure? yes | no
(and a security nightmare)
Are you sure? yes | no