借鉴于python网络编程攻略
#/usr/local/bin/python3.5 #coding:utf-8 import socket, struct, time NTP_server = "0.uk.pool.ntp.org" TIME1970 = 2208988800 def sntp_client(): client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) data = "x1b" + 47 * "