From: mkanat%bugzilla.org <> Date: Tue, 2 Jun 2009 03:47:44 +0000 (+0000) Subject: Bug 491630: Make sure DateTime never gets fractional "seconds" in new() X-Git-Tag: bugzilla-3.4rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f747ff9cb35856478fddbee1e993411cb99dabfa;p=thirdparty%2Fbugzilla.git Bug 491630: Make sure DateTime never gets fractional "seconds" in new() Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index a725a8e21f..b3d5b0eaad 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -444,7 +444,8 @@ sub format_time { day => $time[3], hour => $time[2], minute => $time[1], - second => $time[0], + # DateTime doesn't like fractional seconds. + second => int($time[0]), # If importing, use the specified timezone, otherwise # use the timezone specified by the server. time_zone => Bugzilla->local_timezone->offset_as_string($time[6])