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.

作者 r.david.murray
收信人 ajaksu2, akuchling, belopolsky, brett.cannon, doerwalter, eric.araujo, r.david.murray, tim.peters
日期 2011-07-13.23:04:37
SpamBayes Score 7.385748e-05
Marked as misclassified
Message-id <1310598278.48.0.105800311121.issue665194@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2011-07-13 23:04:38r.david.murray修改recipients: + r.david.murray, tim.peters, akuchling, doerwalter, brett.cannon, belopolsky, ajaksu2, eric.araujo
2011-07-13 23:04:38r.david.murray修改messageid: <1310598278.48.0.105800311121.issue665194@psf.upfronthosting.co.za>
2011-07-13 23:04:37r.david.murray链接issue665194 messages
2011-07-13 23:04:37r.david.murray创建