[issue12750] datetime.datetime timezone problems
R. David Murray
report at bugs.python.org
Mon Aug 15 16:09:46 CEST 2011
R. David Murray <rdmurray at bitdance.com> added the comment:
In what way does 'replace' not satisfy your need to set the tzinfo?
As for utcnow, we can't change what it returns for backward compatibility reasons, but you can get a non-naive utc datatime by doing datetime.now(timezone.utc). (I must admit, however, that at least this morning I can't wrap my head around how that works based on the docs :(.
----------
nosy: +r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12750>
_______________________________________
More information about the Python-bugs-list
mailing list