]> 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:07:46 +0000 (07:07 +0000)
committerreed%reedloden.com <>
Tue, 5 Jan 2010 07:07:46 +0000 (07:07 +0000)
Bugzilla/BugMail.pm
Bugzilla/Util.pm
template/en/default/email/newchangedmail.txt.tmpl

index 9a8baca590cf99aa70303cd36aa1b50b427df1c3..55a9598efcb6991cd077dd971a5eb7b00ad595a1 100644 (file)
@@ -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'},
index 2ffd3efeb23506153601373d34e4bdfdb9775334..1d5785d34b63c39cd8e402629acec577bf2780dd 100644 (file)
@@ -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) {
index 9b1443bc2fbb89e760e4cc075b5ad622551731ac..a9779c6b2091e08b5b73a2678acfff34b65e69fd 100644 (file)
@@ -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 %]