Defect #13888

Daylight savings causes inconsistency of Message-Id in emails

Added by pasquale [:dedalus] about 6 years ago. Updated 5 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Email notifications
Target version:4.1.0
Resolution:Fixed Affected version:

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

bug13851.patch Magnifier - xref bug #13851 (969 Bytes) pasquale [:dedalus], 2013-04-26 08:41

fix-13888.diff Magnifier (1.1 KB) Go MAEDA, 2019-02-18 15:30


Related issues

Duplicated by Redmine - Defect #13851: Unthreade new mail message Closed

Associated revisions

Revision 17890
Added by Go MAEDA 5 months ago

Daylight savings causes inconsistency of Message-Id (#13888).

Patch by Go MAEDA.

History

#1 Updated by IFPE JAB about 2 years ago

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!

#2 Updated by Toshi MARUYAMA almost 2 years ago

  • Priority changed from Urgent to Normal

#3 Updated by Go MAEDA 5 months ago

  • 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)

#4 Updated by pasquale [:dedalus] 5 months ago

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

#5 Updated by Go MAEDA 5 months ago

  • File fix-13888.diffMagnifier 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.

#6 Updated by Go MAEDA 5 months ago

  • Category changed from Email receiving to Email notifications

#7 Updated by Go MAEDA 5 months ago

  • 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.

#8 Updated by Go MAEDA 5 months ago

  • Assignee set to Go MAEDA

#9 Updated by Go MAEDA 5 months ago

#10 Updated by Go MAEDA 5 months ago

Also available in: Atom PDF