Skip to content

Instantly share code, notes, and snippets.

@leollon
Last active June 5, 2020 04:22
Show Gist options
  • Save leollon/9f7e507b5b75d2d37de094f57dd1bc1b to your computer and use it in GitHub Desktop.
Save leollon/9f7e507b5b75d2d37de094f57dd1bc1b to your computer and use it in GitHub Desktop.
get current network time.
#/bin/bash
wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8
# Can be used to set system time on vps server whose provider blocks external ntp packages, Having to combine with `date -s` command
# https://askubuntu.com/a/655528/935221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment