发布时间:2019-07-25 09:13:04编辑:auto阅读(1486)
import dateutil
from dateutil import tz
utc = tz.tzutc()
t = dateutil.parser.parse("2017-02-24T19:36:20-05:00")
print t
#输出
#datetime.datetime(2017, 2, 24, 19, 36, 20, tzinfo=tzoffset(None, -18000))
t.astimezone(utc)
#输出
#datetime.datetime(2017, 2, 25, 0, 36, 20, tzinfo=tzutc())
上一篇: Win10环境python3.7安装dl
下一篇: Python入门学习之operator-
47487
45791
36787
34320
28957
25592
24438
19608
19106
17630
5460°
6044°
5567°
5634°
6569°
5373°
5372°
5880°
5853°
7165°