# If there are users in the CC list who don't have an account,
# use the default language for email notifications.
my $default_lang;
+ my $default_timezone;
if (grep { !$_ } values %recipients) {
$default_lang = Bugzilla::User->new()->settings->{'lang'}->{'value'};
+ $default_timezone = Bugzilla::User->new()->settings->{'timezone'}->{'value'};
}
foreach my $to (keys %recipients) {
# Add threadingmarker to allow flag notification emails to be the
# threaded similar to normal bug change emails.
my $thread_user_id = $recipients{$to} ? $recipients{$to}->id : 0;
-
+
+ my $timezone = $recipients{$to} ?
+ $recipients{$to}->settings->{'timezone'}->{'value'} : $default_timezone;
+
my $vars = { 'flag' => $flag,
'old_flag' => $old_flag,
'to' => $to,
+ 'timezone' => $timezone,
'bug' => $bug,
'attachment' => $attachment,
'threadingmarker' => build_thread_marker($bug->id, $thread_user_id) };
# Sendmail adds a Date: header also, but others may not.
if (!defined $email->header('Date')) {
- $email->header_set('Date', time2str("%a, %e %b %Y %T %z", time()));
+ $email->header_set('Date', time2str("%a, %d %b %Y %T %z", time()));
}
}
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [[% terms.Bug %] [%+ bug.id %]] [% 'New: ' IF isnew %][%+ bug.short_desc %]
+Date: [% bug.delta_ts FILTER time("%a, %d %b %Y %T %z", to_user.timezone) %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
From: [% Param('mailfrom') %]
To: [% to %]
Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
+Date: [% bug.delta_ts FILTER time("%a, %d %b %Y %T %z", timezone) %]
[%- IF attachment %] :
[Attachment [% attachment.id %]] [% attachment.description %][% END %]
X-Bugzilla-Type: request