sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
Ref; https://askubuntu.com/questions/81293/what-is-the-command-to-update-time-and-date-from-internet
The ramblings of a software developer
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
Ref; https://askubuntu.com/questions/81293/what-is-the-command-to-update-time-and-date-from-internet