Why does datetime.datetime.utcnow() not contain timezone information?

前端 未结 9 1078
南方客
南方客 2020-11-29 16:12
datetime.datetime.utcnow()

Why does this datetime not have any timezone info given that it is explicitly a UTC datetime?<

9条回答
  •  悲&欢浪女
    2020-11-29 17:16

    UTC dates don't need any timezone info since they're UTC, which by definition means that they have no offset.

提交回复
热议问题