]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving...
authorreed%reedloden.com <>
Tue, 5 Jan 2010 07:05:59 +0000 (07:05 +0000)
committerreed%reedloden.com <>
Tue, 5 Jan 2010 07:05:59 +0000 (07:05 +0000)
Bugzilla/BugMail.pm
Bugzilla/Util.pm
template/en/default/email/newchangedmail.txt.tmpl

index 2aff7daf4e3baad6e132923fb6ab418ae5cd4021..f7af921ebc320b2532e62bcc78cdb74521c8e9fe 100644 (file)
@@ -612,7 +612,7 @@ sub sendMail {
 
     my $vars = {
         isnew => $isnew,
-        to => $user->email,
+        to_user => $user,
         bugid => $id,
         alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
         classification => $values{'classification'},
index ca2506ffa3c628cc6a72d4305c50678bc104b426..437979c85371749d4cda16d6cb023420ac659d6f 100644 (file)
@@ -413,8 +413,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 (!ref $date
             && $date =~ /^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/) 
         {
index 368c237134a93cb6f13621ba697ca287b78c96ed..1bcc2e40d1082a7e859d51e161588dae724965c4 100644 (file)
@@ -20,7 +20,7 @@
 
 [% PROCESS "global/variables.none.tmpl" %]
 From: [% Param('mailfrom') %]
-To: [% to %]
+To: [% to_user.email %]
 Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %]
 X-Bugzilla-Reason: [% reasonsheader %]
 X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
@@ -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 %]
 [%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %]
 [% END %]