time py

time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))  #转化为时间格式2018-12-11 12:20:20

time.time() #1530669705.3839412  时间戳

round(time.time())  #秒时间戳

round(time.time()*1000) #毫秒时间戳

round(float_num,小数位数) #小数位数为空,则默认是整数

 

你可能感兴趣的:(工具教程)