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")

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM