Skip to content

Instantly share code, notes, and snippets.

@lujiacn
Created July 22, 2016 05:06
Show Gist options
  • Save lujiacn/d408b37b7297c1e8baaf2a212ab4cd7e to your computer and use it in GitHub Desktop.
Save lujiacn/d408b37b7297c1e8baaf2a212ab4cd7e to your computer and use it in GitHub Desktop.
sudo date -s "$(wget -S "http://www.google.com/" 2>&1 | grep -E '^[[:space:]]*[dD]ate:' | sed 's/^[[:space:]]*[dD]ate:[[:space:]]*//' | head -1l | awk '{print $1, $3, $2, $5 ,"GMT", $4 }' | sed 's/,//')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment