]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 491630: Make sure DateTime never gets fractional "seconds" in new()
authormkanat%bugzilla.org <>
Tue, 2 Jun 2009 03:47:44 +0000 (03:47 +0000)
committermkanat%bugzilla.org <>
Tue, 2 Jun 2009 03:47:44 +0000 (03:47 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit

Bugzilla/Util.pm

index a725a8e21f38f7f8d70b2dfed3a6231e71788cde..b3d5b0eaadba3d3b55d59ec15caa773f698f3ddc 100644 (file)
@@ -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])