Defect #13888
closed
Daylight savings causes inconsistency of Message-Id in emails
Added by pasquale [:dedalus] over 11 years ago.
Updated almost 6 years ago.
Category:
Email notifications
Description
This to maintained threaded messages that are referred to same bug but are posted before and after daylight savings off\on
For me this is urgent because messed up my threaded bug mail.
xref bug #13851
Files
pasquale [:dedalus] wrote:
This to maintained threaded messages that are referred to same bug but are posted before and after daylight savings off\on
For me this is urgent because messed up my threaded bug mail.
xref bug #13851
nice job!
- Priority changed from Urgent to Normal
- Target version set to Candidate for next major release
We don't have to care about daylight savings if we always use UTC when generating a message-id.
Index: app/models/mailer.rb
===================================================================
--- app/models/mailer.rb (リビジョン 17870)
+++ app/models/mailer.rb (作業コピー)
@@ -721,7 +721,7 @@
hash = [
"redmine",
"#{object.class.name.demodulize.underscore}-#{object.id}",
- timestamp.strftime("%Y%m%d%H%M%S")
+ timestamp.utc.strftime("%Y%m%d%H%M%S")
]
if rand
hash << Redmine::Utils.random_hex(8)
Go MAEDA wrote:
We don't have to care about daylight savings if we always use UTC when generating a message-id.
[...]
yep, I agree
- File fix-13888.diff fix-13888.diff added
- Tracker changed from Patch to Defect
- Subject changed from Fix message-id mail header to be invariant respect daylight savings to Daylight savings causes inconsistency of Message-Id in emails
- Target version changed from Candidate for next major release to 4.1.0
Attaching a patch that includes a test.
- Category changed from Email receiving to Email notifications
- Status changed from New to Closed
- Resolution set to Fixed
Committed the fix.
The timestamp is UTC after r17890. Daylight savings will never affect message-id.
Also available in: Atom
PDF