added simple ntp query script

This commit is contained in:
TKE
2019-12-17 13:37:50 +01:00
parent 79a0c9e34f
commit 80af4fc1f7

10
get_ntp.py Executable file
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")