aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-09-30 18:01:38 -0400
committerDylan William Hardison <dylan@hardison.net>2014-09-30 18:03:11 -0400
commitf5a7c7d2472f5a4940343785ab9619247f8895a5 (patch)
tree6de49a50676f4b573b8181541a73aefae32b7d43 /Bugzilla
parent141b8b9ef9cd9e1c480abdf8c360582b1b59db9d (diff)
downloadbugs-f5a7c7d2472f5a4940343785ab9619247f8895a5.tar
bugs-f5a7c7d2472f5a4940343785ab9619247f8895a5.tar.gz
bugs-f5a7c7d2472f5a4940343785ab9619247f8895a5.tar.bz2
bugs-f5a7c7d2472f5a4940343785ab9619247f8895a5.tar.xz
bugs-f5a7c7d2472f5a4940343785ab9619247f8895a5.zip
Bug 1070317 - Bugzilla::Flag's attribute modification_date is affected by the user's timezone and differs from the database copy after a call to $flag->update()
r=dkl, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Flag.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 6e2096729..772a39325 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -454,14 +454,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);
Bugzilla->memcached->clear({ table => 'flags', id => $self->id });
}
return $changes;