13位时间戳转换年月日时分秒格式

直接使用  arrow  函数来做这个转换

直接上代码

t = arrow.get(long(time_long)/1000).to("local")
t.format("YYYY-MM-DDTHH:mm:ssZZ")

获取13位时间戳 

可以使用  arrow  里面的  float_timestamp  精确到毫秒级别,避免在实际使用中的不精确问题

int(arrow.get(found_time).to("local").float_timestamp * 1000)

 使用  arrow  来把时间戳转换为带时区的文本格式

arrow.get(ts / 1000).to("local") .format("YYYY-MM-DDTHH:mm:ss.SSS+0800")
原文地址:https://www.cnblogs.com/shangwei/p/14180125.html