直接使用  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")

 

相关文章:

  • 2022-12-23
  • 2021-11-22
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2021-06-03
  • 2021-12-26
  • 2022-02-13
  • 2022-12-23
相关资源
相似解决方案