#12666 closed (fixed)
Setting for sending email using localtime instead of UTC — at Version 2
Reported by: | net147 | Owned by: | nobody |
---|---|---|---|
Component: | Core (Mail) | Version: | 1.1 |
Severity: | Normal | Keywords: | |
Cc: | mmitar@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
I would like to be able to send emails using local time in the Date header instead of UTC by default.
Changes needed (based on Django 1.1.1):
django/conf/global_settings.py
:- Add
"EMAIL_USE_LOCALTIME = False"
(won't sent using local time by default unless you explicitly enable it)
- Add
django/core/mail.py
:- Change
"msg['Date'] = formatdate()"
to"msg['Date'] = formatdate(localtime=settings.EMAIL_USE_LOCALTIME)"
- Change
Note:
See TracTickets
for help on using tickets.
Is there a particularly compelling reason to send mail with headers in local time, rather than against UTC?
Marking wontfix because I'm not aware of any particular advantage. If you can provide any evidence that it's the right/best practice thing to do, this shouldn't be configurable - it should be turned on by default.