* ui_ux: => 0
* easy: => 0
Comment:
In django/core/mail/message.py (Django 1.3.1)
msg['Date'] = formatdate()
There is no localtime=True and emails are sending using UTC
When I correct django/core/mail/message.py to
msg['Date'] = formatdate(localtime=True)
Then emails are being sent with correct Date header (using local time with
timezone)
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: mmitar@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:13>
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:14>
* status: new => assigned
* owner: nobody => aisipos
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:15>
Comment (by carljm):
I'm not convinced of the value of the refactoring proposed in
https://code.djangoproject.com/ticket/12666#comment:9 -- if someone really
wants some strange handling for the Date header, they can just set the
header themselves, which is likely easier than subclassing `Email` for
this purpose. Exposing the stdlib's `localtime` boolean flag is a simple
change which would be friendlier to those who want a local timezone in
their email headers, especially if it actually does respect the currently
active Django timezone (e.g. `TIME_ZONE` setting). (It's not clear to me
from the above whether it does or not; that deserves clarification.)
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:16>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/6703 PR] with comments for
improvement.
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:17>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c3495bb984a6f639e828e568fd333e36b46f270f" c3495bb9]:
{{{
#!CommitTicketReference repository=""
revision="c3495bb984a6f639e828e568fd333e36b46f270f"
Fixed #12666 -- Added EMAIL_USE_LOCALTIME setting.
When EMAIL_USE_LOCALTIME=True, send emails with a Date header
in the local time zone.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12666#comment:18>