摘要: import ntplib import os,datetime hosts = ['0.cn.pool.ntp.org','1.cn.pool.ntp.org','2.cn.pool.ntp.org','3.cn.pool.ntp.org'] hosts=['ntp.aliyun.com','nt 阅读全文
posted @ 2022-03-20 09:50 myrj 阅读(439) 评论(0) 推荐(0) 编辑
摘要: def get_web_now_timea(time_format='YYYY-MM-DD HH:mm:ss.SSSSSS'): """ 获取网络时间,返回时间格式:2019-12-13 11:39:48.398 :param time_format:控制返回字符串的格式,默认为:'YYYY-MM- 阅读全文
posted @ 2022-03-20 09:32 myrj 阅读(375) 评论(0) 推荐(0) 编辑
摘要: import ntplib import os,datetime def ntp_client(): #hosts = ['0.cn.pool.ntp.org','1.cn.pool.ntp.org','2.cn.pool.ntp.org','3.cn.pool.ntp.org'] hosts=[' 阅读全文
posted @ 2022-03-20 09:28 myrj 阅读(296) 评论(0) 推荐(0) 编辑
摘要: import datetime import time def get_float_time_stamp(): datetime_now = datetime.datetime.now() return datetime_now.timestamp() def get_time_stamp16(): 阅读全文
posted @ 2022-03-20 06:04 myrj 阅读(860) 评论(0) 推荐(0) 编辑