[New-bugs-announce] [issue5094] datetime lacks concrete tzinfo impl. for UTC

Brett Cannon report at bugs.python.org
Thu Jan 29 01:52:43 CET 2009


New submission from Brett Cannon <brett at python.org>:

When you call datetime.datetime.utcnow() you get back a naive datetime
object. But why? You asked for UTC as the timezone based on what method
call you made. And UTC is a very concrete timezone that never changes.

It would be nice to have a concrete UTC tzinfo class that utcnow() uses
so that at least those datetime instances are non-naive.

If people have no issues with making this happen I will write the code
for the concrete UTC tzinfo instance and make the appropriate changes to
utcnow().

----------
components: Extension Modules
messages: 80735
nosy: brett.cannon
severity: normal
status: open
title: datetime lacks concrete tzinfo impl. for UTC
versions: Python 2.7, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5094>
_______________________________________


More information about the New-bugs-announce mailing list