Vote #73830
完了Daylight savings causes inconsistency of Message-Id in emails
0%
説明
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
journals
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!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
We don't have to care about daylight savings if we always use UTC when generating a message-id.
<pre><code class="diff">
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)
</code></pre>
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
Attaching a patch that includes a test.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Committed the fix.
The timestamp is UTC after r17890. Daylight savings will never affect message-id.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
duplicates,Closed,13851,Unthreade new mail message