time.strftime() NOT producing RFC2822-compliant Date strings?

richard richardjones at optushome.com.au
Thu Jan 12 22:12:08 EST 2006


Peter Hansen wrote:
> richard wrote:
>> I'm just dealing with a Roundup bug report in which it's pointed out that
>> time.strftime() doesn't produce RFC2822-compliant date strings when in a
>> locale other than "C".
> 
> While it doesn't fix strftime() (though a change to the docs might do
> that <wink>), using email.Utils.formatdate() appears likely to fix your
> immediate problem, not to mention looking cleaner.

Yeah, of course I only thought of the email module *after* I hit the send
button :)

Roundup was started in the 2.0 days of Python, with 1.5.2-compatibility a
big requirement back then, so the email module hasn't really factored into
its development until "relatively recently" :)


     Richard




More information about the Python-list mailing list