Opened 5 years ago

Closed 5 years ago

#13535 closed (duplicate)

E-mail date header should be in the local time zone

Reported by: geofft Owned by: nobody
Component: Core (Mail) Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Outgoing e-mails should use the time zone of the application instead of hardcoding UTC-0. In addition to generally making more sense for servers outside England, my e-mail client (alpine) happens to display the time in the index view without converting it to local time. Fortunately, using the local time zone is easy:

>>> email.Utils.formatdate()
'Fri, 14 May 2010 06:38:42 -0000'
>>> email.Utils.formatdate(localtime=True)
'Fri, 14 May 2010 02:39:33 -0400'

I've attached a patch to django.core.mail.message to effect this.

Attachments (1)

mail-date-localtime.diff (604 bytes) - added by geofft 5 years ago.
Call formatdate with localtime=True.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by geofft

Call formatdate with localtime=True.

comment:1 Changed 5 years ago by ramiro

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #12666.

Note: See TracTickets for help on using tickets.
Back to Top