Message127186
imaplib's Time2Internaldate returns invalid (as localized) INTERNALDATE strings. Appending a message with such a time string leads to a:
19 BAD Command Argument Error. 11 (for MS Exchange IMAP servers)
it returned "26-led-2011 18:23:44 +0100", however:
http://tools.ietf.org/html/rfc2060.html defines:
date_month ::= "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" /
"Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
so it expects an English date format.
imaplib's Time2Internaldate uses time.strftime() to create the final string which uses the current locale, returning things such as:
"26-led-2011 18:23:44 +0100" rather than "26-Jan-2011 18:23:44 +0100".
For the right thing to do, we would need to set locale.setlocale(locale.LC_TIME, '') to get English formatting or we would need to use some home-grown parser that hardcodes the proper terms. |
|
Date |
User |
Action |
Args |
2011-01-27 13:35:01 | spaetz | set | recipients:
+ spaetz |
2011-01-27 13:35:01 | spaetz | set | messageid: <1296135301.42.0.767818406183.issue11024@psf.upfronthosting.co.za> |
2011-01-27 13:35:00 | spaetz | link | issue11024 messages |
2011-01-27 13:35:00 | spaetz | create | |
|