您可以使用 Python 中的 time 模块来获取当前时间的时间戳。以下是一个示例代码:

import time

# 获取当前时间的时间戳
timestamp = int(time.time())

print(timestamp)

输出结果类似于:1599497058。其中,时间戳是从 1970 年 1 月 1 日 00:00:00 UTC 开始到当前时间的秒数。

获取当天时间的时间戳

原文地址: https://www.cveoy.top/t/topic/fGD6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录