Message140317
| Author |
r.david.murray |
| Recipients |
ajaksu2, akuchling, belopolsky, brett.cannon, doerwalter, eric.araujo, r.david.murray, tim.peters |
| Date |
2011年07月13日.23:04:37 |
| SpamBayes Score |
7.385748e-05 |
| Marked as misclassified |
No |
| Message-id |
<1310598278.48.0.105800311121.issue665194@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
OK, here is a new patch proposal. As suggested by Alexander, it adds two functions to email.utils: format_datetime and parsedate_to_datetime. Adding these does not require having localtime. In fact, with this patch you can get an aware datetime representing email's current best guess at localtime by doing:
dt = parsedate_to_datetime(formatdate(localtime=True))
Reviews welcome, but this is simple enough I'll probably just commit it if no one objects. |
|