📜  datetime.time 到秒 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:57.690000             🧑  作者: Mango

代码示例2
from datetime import datetime

t = datetime.now().time()
seconds = (t.hour * 60 + t.minute) * 60 + t.second