From: reed%reedloden.com <> Date: Tue, 5 Jan 2010 07:07:46 +0000 (+0000) Subject: Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving... X-Git-Tag: bugzilla-3.4.5~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a906f3a70816100ec54dde4fa5833044203ab29;p=thirdparty%2Fbugzilla.git Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving the mail" [p=reed r=mkanat a=mkanat] --- diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 9a8baca590..55a9598efc 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -617,6 +617,7 @@ sub sendMail { my $vars = { isnew => $isnew, to => $user->email, + to_user => $user, bugid => $id, alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", classification => $values{'classification'}, diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 2ffd3efeb2..1d5785d34b 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -408,8 +408,8 @@ sub wrap_hard { sub format_time { my ($date, $format, $timezone) = @_; - # If $format is undefined, try to guess the correct date format. - if (!defined($format)) { + # If $format is not set, try to guess the correct date format. + if (!$format) { if ($date =~ m/^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/) { my $sec = $7; if (defined $sec) { diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index 9b1443bc2f..a9779c6b20 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -48,7 +48,7 @@ X-Bugzilla-Changed-Fields: [% changedfields %] [% FOREACH comment = new_comments %] [%- IF comment.count %] ---- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] --- +--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time(undef, to_user.timezone) %] --- [% END %] [%+ FILTER remove('^X') %][% PROCESS bug/format_comment.txt.tmpl %][% END %] [% END %]