Ticket #3554: explicit_timezone_offset.patch

File explicit_timezone_offset.patch, 774 bytes (added by mrmachine <real dot human at mrmachine dot net>, 18 years ago)

replace rfc822.formatdate() with email.Utils.formatdate() in django.core.mail

  • django/core/mail.py

     
    33from django.conf import settings
    44from email.MIMEText import MIMEText
    55from email.Header import Header
    6 import smtplib, rfc822
     6from email.Utils import formatdate
     7import smtplib
    78import socket
    89import time
    910import random
     
    6566        msg['Subject'] = subject
    6667        msg['From'] = from_email
    6768        msg['To'] = ', '.join(recipient_list)
    68         msg['Date'] = rfc822.formatdate()
     69        msg['Date'] = formatdate()
    6970        try:
    7071            random_bits = str(random.getrandbits(64))
    7172        except AttributeError: # Python 2.3 doesn't have random.getrandbits().
Back to Top