added simple ntp query script

This commit is contained in:
TKE
2019-12-17 13:37:50 +01:00
parent 044cda45df
commit 1b24b85949
Executable
+10
View File
@@ -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")