Formatting RFC 822 date

Matthew Dixon Cowles matt at mondoinfo.com
Wed Apr 4 19:44:51 EDT 2001


On Wed, 4 Apr 2001 17:25:16 -0400, Barry A. Warsaw <barry at digicool.com> wrote:

>>>>>> "MDC" == Matthew Dixon Cowles <matt at mondoinfo.com> writes:
> MDC> I'll append what I do in Swallow. I think it's right.

>How about rfc822.formatdate()? :)

Cool. Thanks for pointing that out Barry. I didn't know about it.
I'd start using it immediately except for a couple of things:

It's not available in 1.5.2 and I'd like to go on supporting
1.5.2 for a while.

It only generates dates in the GMT timezone and I'd like to
generate ones in the local timezone.

It uses strftime() to generate the day and month names. The
documentation for the time module says that strftime() produces
text values that are appropriate for the current locale but
RFC822 seems to imply that the strings must be English. 

Regards,
Matt



More information about the Python-list mailing list