消息 [140317]
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:38 | r.david.murray | 修改 | recipients:
+ r.david.murray, tim.peters, akuchling, doerwalter, brett.cannon, belopolsky, ajaksu2, eric.araujo |
| 2011-07-13 23:04:38 | r.david.murray | 修改 | messageid: <1310598278.48.0.105800311121.issue665194@psf.upfronthosting.co.za> |
| 2011-07-13 23:04:37 | r.david.murray | 链接 | issue665194 messages |
| 2011-07-13 23:04:37 | r.david.murray | 创建 | |
|