[英]Python reading datetime string ( reading T01:00:00-07:00 with python )
Has anyone converted this kind of times before?以前有人转换过这种时代吗?
2020-10-12T01:00:00-07:00 to 2020-10-12T09:00:00-07:00
equals等于
Monday, October 12, 2020 at 10:00 AM – 6:00 PM UTC+02
to datetime objects?日期时间对象?
2020-10-12T01:00:00-07:00
<--date--> <-time-><zone>
This means 1am
on October 12th, 2020
, in the time zone 7 hours west of UTC (running through the middle of the US , basically).这意味着
October 12th, 2020
年October 12th, 2020
1am
,在 UTC 以西 7 小时的时区(基本上贯穿美国中部)。
It's actually one of the ISO8601 formats, used for date/time data interchange.它实际上是ISO8601格式之一,用于日期/时间数据交换。
I believe the dateutil.parser()
library can handle this in Python.我相信
dateutil.parser()
库可以在 Python 中处理这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.