Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
Created July 14, 2020 07:53
Show Gist options
  • Save v-thomp4/8d63c298dc327345039e5279026d0bf4 to your computer and use it in GitHub Desktop.
Save v-thomp4/8d63c298dc327345039e5279026d0bf4 to your computer and use it in GitHub Desktop.
set datetime behind proxy
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