python獲取時間及時間格式轉換

整理總結一下python中最經常使用的一些時間戳和時間格式的轉換python 第一部分:獲取當前時間和10位13位時間戳code import datetime, time '''獲取當前時間''' n = datetime.datetime.now() print(n) '''獲取10位時間戳''' now = time.time() print(int(now)) '''獲取13位時間戳
相關文章
相關標籤/搜索