Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Last active April 3, 2020 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/bfcb84f36156d5f24bbd26dfced0cbe7 to your computer and use it in GitHub Desktop.
Save rtrouton/bfcb84f36156d5f24bbd26dfced0cbe7 to your computer and use it in GitHub Desktop.
One-liner to check using curl to see if a server's system clock has the correct time by comparing it against Google's. Requires all servers involved to be running web services.
curl -ks --head https://myserver.goes.here | grep -i ^Date: | sed 's/[Dd]ate/MyServer/g' && curl -s --head http://www.google.com | grep ^Date: | sed 's/Date/Google/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment