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 ajaksu2, akuchling, barry, belopolsky, doerwalter, eric.araujo, python-dev, r.david.murray, tim.peters
Date 2012-08-22.02:04:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345601078.2.0.2160500782.issue665194@psf.upfronthosting.co.za>
In-reply-to
Content
I noticed this part:

+        # We have an aware datetime.  Use aware datetime arithmetic to find the
+        # seconds since the epoch.
+        delta = dt - datetime.datetime(*time.gmtime(0)[:6],
+                                       tzinfo=datetime.timezone.utc)
+        seconds = delta.total_seconds()

Why don't you just return dt.astimezone() here?  A round trip through a floating point timestamp always makes me nervous.  I doubt loss of precision is a problem for the e-mail package, but who knows.
History
Date User Action Args
2012-08-22 02:04:38belopolskysetrecipients: + belopolsky, tim.peters, barry, akuchling, doerwalter, ajaksu2, eric.araujo, r.david.murray, python-dev
2012-08-22 02:04:38belopolskysetmessageid: <1345601078.2.0.2160500782.issue665194@psf.upfronthosting.co.za>
2012-08-22 02:04:37belopolskylinkissue665194 messages
2012-08-22 02:04:37belopolskycreate