Last active
December 2, 2023 11:56
-
-
Save abramovk/a6c40117b2b468d39fa5cebf17b6fd6e to your computer and use it in GitHub Desktop.
Update datetime from google
This file contains 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/sh | |
httpdate="$(wget --no-cache -S -O /dev/null google.com 2>&1 | | |
sed -n -e 's/ *Date: *//p' -eT -eq)" | |
[ -n "$httpdate" ] && date -s "$httpdate" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment