diff --git a/get_ntp.py b/get_ntp.py new file mode 100755 index 0000000..a362400 --- /dev/null +++ b/get_ntp.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import ntplib +import sys +from time import ctime +c = ntplib.NTPClient() +try: + response = c.request(sys.argv[1]) + print(ctime(response.tx_time)) +except: + print("ERROR")