I\'ve written a ntp client in python to query a time server and display the time and the program executes but does not give me any results. I\'m using python\'s 2.7.3 integ
Use ntplib:
The following should work on both Python 2 and 3:
import ntplib from time import ctime c = ntplib.NTPClient() response = c.request('pool.ntp.org') print(ctime(response.tx_time))
Output:
Fri Jul 28 01:30:53 2017