sudo date -s "$(curl -H'Cache-Control:no-cache' -sI google.com | grep '^Date:' | cut -d' ' -f3-6)Z"
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
apt install htpdate
usage
htpdate -D -u nobody:nogroup www.linux.org www.freebsd.org
for more https://linux.die.net/man/8/htpdate
sudo tlsdate -V
More https://github.com/ioerror/tlsdate
https://gist.github.com/jaytaylor/60c8a4e22431c4271200cab68186deb7