秒级

import time

now = time.time() #返回float数据
#  获取当前时间戳---秒级级
print(int(now))

毫秒级

import time

now = time.time() #返回float数据

#毫秒级时间戳
print(int(round(now * 1000)))

 

时间戳在线转换工具:

https://tool.lu/timestamp/

相关文章:

  • 2021-11-18
  • 2022-02-17
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
相关资源
相似解决方案