]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1070317 - Bugzilla::Flag's attribute modification_date is affected by the user...
authorDylan William Hardison <dylan@hardison.net>
Tue, 30 Sep 2014 22:01:38 +0000 (18:01 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 30 Sep 2014 22:05:56 +0000 (18:05 -0400)
r=dkl, a=justdave

Bugzilla/Flag.pm

index 3cba94c883f588f9a368399d6f3f2339dc83fb47..ac06a255c5e00b37f7054c7acfd5d712fb328bc3 100644 (file)
@@ -455,14 +455,15 @@ sub create {
 sub update {
     my $self = shift;
     my $dbh = Bugzilla->dbh;
-    my $timestamp = shift || $dbh->selectrow_array('SELECT NOW()');
+    my $timestamp = shift || $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
 
     my $changes = $self->SUPER::update(@_);
 
     if (scalar(keys %$changes)) {
         $dbh->do('UPDATE flags SET modification_date = ? WHERE id = ?',
                  undef, ($timestamp, $self->id));
-        $self->{'modification_date'} = format_time($timestamp, '%Y.%m.%d %T');
+        $self->{'modification_date'} =
+          format_time($timestamp, '%Y.%m.%d %T', Bugzilla->local_timezone);
     }
     return $changes;
 }