Message 60345 - Python tracker (original) (raw)

Logged In: YES user_id=139865

Careful, date/time formats differ between RFCs.

RFC 850 = Wdy, DD-Mon-YYYY HH:MM:SS (UT/GMT/(+/-)DDDD/...) RFC 2616 = Wdy, DD Mon YYYY HH:MM:SS GMT RFC 2822 = Wdy, DD Mon YYYY HH:MM:SS (+/-)DDDD

rfc822.formatstring deprecated; let it rot email.Utils.formatdate uses RFC 2822, the One True Date Format logging.handlers.SMTPHandler.date_time uses RFC 2616, should be using RFC 2822 BaseHTTPServer.HTTPServer.date_time_string uses RFC 2616 Cookie._getdate uses RFC 850

Patch 791776 changes SMTPHandler to use rfc2822.formatdate. grepping for day names, month names, year, gmtime, and localtime does not reveal further duplication.