From: Dylan William Hardison Date: Sat, 8 Oct 2016 17:01:39 +0000 (-0700) Subject: Bug 1300437 - DateTime::TimeZone::offset_as_string called incorrectly (#19) X-Git-Tag: release-5.0.4~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=adcfe9f154e6751b842ba930de5300fe72214e4e;p=thirdparty%2Fbugzilla.git Bug 1300437 - DateTime::TimeZone::offset_as_string called incorrectly (#19) --- diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 0731d4fedf..148567d866 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 bbf4261ca2..5fe64621bc 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, );