稳定盈利的期货交易方法-量化趋势交易

alantop -专业量化投资者

爱好:量化投资,逆向工程,渗透
随笔 - 595, 文章 - 0, 评论 - 921, 引用 - 0
数据加载中……

python ntp客户端校时

import os 
import time 
import ntplib 
c = ntplib.NTPClient()
response = c.request('10.2.15.168') 
ts = response.tx_time 
_date = time.strftime('%Y-%m-%d',time.localtime(ts)) 
_time = time.strftime('%X',time.localtime(ts)) 
os.system('date {} && time {}'.format(_date,_time)) 

posted on 2018-01-31 16:08 AlanTop 阅读(473) 评论(0)  编辑 收藏 引用 所属分类: Python


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理