Skip to content

Instantly share code, notes, and snippets.

@haxrob
Last active February 18, 2019 11:06
Show Gist options
  • Save haxrob/b878a9ba3472bbf64f8db9f56556fe82 to your computer and use it in GitHub Desktop.
Save haxrob/b878a9ba3472bbf64f8db9f56556fe82 to your computer and use it in GitHub Desktop.
Set local time based on google.com's HTTPS certificate using curl
#!/bin/bash
# Expects GMT
curl -v --silent https://google.com 2>&1 | grep date | tail -1 | sed -e 's/< date: //' > date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment