#-*- coding:utf-8 -*- import socket import struct import time import win32api TimeServer = '210.72.145.44' #国家授时中心ip Port = 123 def getTime(): TIME_1970 = 22088800L client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) data = 'x1b' + 47 * '