datetime 获取当前日期,当前秒,当前时间戳
from datetime import datetime t = datetime.now() print(datetime.date(t)) print(t.isoformat(sep = ' ',timespec = 'seconds')) print(t.timestamp().__str__().replace('.',''))
本文来自博客园,作者:Hany47315,转载请注明原文链接:https://www.cnblogs.com/hany-postq473111315/p/15958414.html