This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, mark.dickinson
Date 2010-07-06.21:55:51
SpamBayes Score 0.0008034246
Marked as misclassified No
Message-id <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch makes timezone(timedelta(0)) always return the same instance as timezone.utc.  See issue9051 for pure python implementation.

With this patch, manipulation of aware datetime objects will be as efficient as that of naive datetime objects.  Note that having timezone.utc is not enough to assure that the same tzinfo object is used because aware objects can be produced by datetime.strptime().  With this patch,

>>> datetime.strptime('2010-07-06 21:39:55 +0000', "%Y-%m-%d %H:%M:%S %z").tzinfo is timezone.utc
True
History
Date User Action Args
2010-07-06 21:55:53belopolskysetrecipients: + belopolsky, mark.dickinson
2010-07-06 21:55:53belopolskysetmessageid: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za>
2010-07-06 21:55:52belopolskylinkissue9183 messages
2010-07-06 21:55:52belopolskycreate