Message168837
| 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. |
|