[issue5094] datetime lacks concrete tzinfo impl. for UTC

Alexander Belopolsky report at bugs.python.org
Tue May 25 23:55:47 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

..
Thanks for the explanation.  I realize that I should not have used the
s-word. :-)  In fact I only wanted a module level constant utc = UTC()
and did not care much about other UTC class instances and whether any
are permitted or easy to create.

Well, the datetime module is not exactly the place you want to start
if you want to lead anyone to best Python practices. :-) (Just think
of datetime subclassing from date!)

> Now if a simple FixedOffsetTimeZone class was added and we just pre-populated the datetime module with a utc attribute that contained an
> instance of that class set to the proper values for UTC, that I could support without controversy.

This is exactly my preferred solution.

----------

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


More information about the Python-bugs-list mailing list