From ee78f645f28436d5684d2ad252a637d8de68c6b7 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 2 Jun 2009 03:47:22 +0000 Subject: Bug 491630: Make sure DateTime never gets fractional "seconds" in new() Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/Util.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index a725a8e21..b3d5b0eaa 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]) -- cgit v1.2.3-24-g4f1b