【发布时间】:2020-09-16 13:00:55
【问题描述】:
我有 due_by 作为本地 datetime 对象,以下解决方案不适合我!
due_by = float(due_by.strftime("%s"))
due_by = datetime.utcfromtimestamp(due_by)
提前致谢!
【问题讨论】:
-
这能回答你的问题吗? How to convert local time string to UTC?
标签: python python-3.x datetime time utc