Last active
June 5, 2020 04:22
-
-
Save leollon/9f7e507b5b75d2d37de094f57dd1bc1b to your computer and use it in GitHub Desktop.
get current network time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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