From fe2251f5ddef052e7d529fc5a8b7d42e3e086b98 Mon Sep 17 00:00:00 2001 From: Andrea Orsini Date: Mon, 19 Sep 2016 11:14:14 -0400 Subject: Bug 1303702 - bug history table 'when' column shows 00:00 only using sqlite r/a=dylan --- Bugzilla/DB/Sqlite.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm index ddafc1696..a56ed31ad 100644 --- a/Bugzilla/DB/Sqlite.pm +++ b/Bugzilla/DB/Sqlite.pm @@ -219,6 +219,7 @@ sub sql_date_format { my ($self, $date, $format) = @_; $format = "%Y.%m.%d %H:%M:%S" if !$format; $format =~ s/\%i/\%M/g; + $format =~ s/\%s/\%S/g; return "STRFTIME(" . $self->quote($format) . ", $date)"; } -- cgit v1.2.1 From adcfe9f154e6751b842ba930de5300fe72214e4e Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 8 Oct 2016 10:01:39 -0700 Subject: Bug 1300437 - DateTime::TimeZone::offset_as_string called incorrectly (#19) --- Bugzilla/Migrate.pm | 2 +- Bugzilla/Util.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 0731d4fed..148567d86 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -403,7 +403,7 @@ sub parse_date { } my $tz; if ($time[6]) { - $tz = Bugzilla->local_timezone->offset_as_string($time[6]); + $tz = DateTime::TimeZone->local_timezone->offset_as_string($time[6]); } else { $tz = $self->config('timezone'); diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index bbf4261ca..5fe64621b 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -588,7 +588,7 @@ sub datetime_from { second => defined($time[0]) ? int($time[0]) : undef, # If a timezone was specified, use it. Otherwise, use the # local timezone. - time_zone => Bugzilla->local_timezone->offset_as_string($time[6]) + time_zone => DateTime::TimeZone->offset_as_string($time[6]) || Bugzilla->local_timezone, ); -- cgit v1.2.1 From 0a2c9378582443bf62911a34706dd571bf2faad7 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 8 Oct 2016 13:09:18 -0400 Subject: nit: wrong method call in Bugzilla::Migrate --- Bugzilla/Migrate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 148567d86..7865c842d 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -403,7 +403,7 @@ sub parse_date { } my $tz; if ($time[6]) { - $tz = DateTime::TimeZone->local_timezone->offset_as_string($time[6]); + $tz = DateTime::TimeZone->offset_as_string($time[6]); } else { $tz = $self->config('timezone'); -- cgit v1.2.1 From 89cb60fe38a7962c876bce18368db90cedda84eb Mon Sep 17 00:00:00 2001 From: Matt Tyson Date: Tue, 11 Oct 2016 19:07:32 -0400 Subject: Bug 1306534 - Crash when pasting UTF8 text as an attachment r=dylan --- Bugzilla/Attachment.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 33183797b..5e25681c3 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -853,6 +853,7 @@ sub create { (id, thedata) VALUES ($attachid, ?)"); trick_taint($data); + utf8::encode($data); $sth->bind_param(1, $data, $dbh->BLOB_TYPE); $sth->execute(); -- cgit v1.2.1 From 070e12173d34e6aeee95e1831f43974810951f0e Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 19 Oct 2016 09:09:43 -0400 Subject: Revert "Bug 1306534 - Crash when pasting UTF8 text as an attachment" This reverts commit 89cb60fe38a7962c876bce18368db90cedda84eb. --- Bugzilla/Attachment.pm | 1 - 1 file changed, 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 5e25681c3..33183797b 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -853,7 +853,6 @@ sub create { (id, thedata) VALUES ($attachid, ?)"); trick_taint($data); - utf8::encode($data); $sth->bind_param(1, $data, $dbh->BLOB_TYPE); $sth->execute(); -- cgit v1.2.1