mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Daylight savings causes inconsistency of Message-Id (#13888).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17890 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5509358885
commit
ffcd722c40
@ -721,7 +721,7 @@ class Mailer < ActionMailer::Base
|
|||||||
hash = [
|
hash = [
|
||||||
"redmine",
|
"redmine",
|
||||||
"#{object.class.name.demodulize.underscore}-#{object.id}",
|
"#{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
|
if rand
|
||||||
hash << Redmine::Utils.random_hex(8)
|
hash << Redmine::Utils.random_hex(8)
|
||||||
|
|||||||
@ -343,6 +343,17 @@ class MailerTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_timestamp_in_message_id_should_be_utc
|
||||||
|
zone_was = Time.zone
|
||||||
|
issue = Issue.find(3)
|
||||||
|
%w(UTC Paris Tokyo).each do |zone|
|
||||||
|
Time.zone = zone
|
||||||
|
assert_match /^redmine\.issue-3\.20060719190727\.[a-f0-9]+@example\.net/, Mailer.token_for(issue)
|
||||||
|
end
|
||||||
|
ensure
|
||||||
|
Time.zone = zone_was
|
||||||
|
end
|
||||||
|
|
||||||
test "#issue_add should notify project members" do
|
test "#issue_add should notify project members" do
|
||||||
issue = Issue.find(1)
|
issue = Issue.find(1)
|
||||||
assert Mailer.deliver_issue_add(issue)
|
assert Mailer.deliver_issue_add(issue)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user