Python 官方文档:入门教程 => 点击学习
根据当前时间戳获得整小时时间戳 unit = 3600 start_time = int(time.time())/3600 * 3600 根据当前时间戳获得整天时间戳 unit = 3600*24 start_time = int(ti
根据当前时间戳获得整小时时间戳
unit = 3600
start_time = int(time.time())/3600 * 3600
根据当前时间戳获得整天时间戳
unit = 3600*24
start_time = int(time.time()) / unit * unit - 8 * 3600
由于时间戳起始为1970 年 1 月 1 日(08:00:00)所以这里需要减8小时才时0点的时间戳
--结束END--
本文标题: python整小时 整天时间戳获取算法
本文链接: https://www.lsjlt.com/news/190662.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0