From 16101ff8da5257bbb86f30ff9dae08369e5dcd09 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Wed, 12 Jan 2005 01:15:42 +0000 Subject: Bug 276473: Show_activity merges incorrectly sometimes changesets into one changeset Patch by vladd@bugzilla.org r=bugzilla@glob.com.au a=justdave --- Bugzilla/Util.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 7ea9f02c9..0328c4f86 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -149,7 +149,7 @@ sub trim { sub format_time { my ($time) = @_; - my ($year, $month, $day, $hour, $min); + my ($year, $month, $day, $hour, $min, $sec); if ($time =~ m/^\d{14}$/) { # We appear to have a timestamp direct from MySQL $year = substr($time,0,4); @@ -158,12 +158,13 @@ sub format_time { $hour = substr($time,8,2); $min = substr($time,10,2); } - elsif ($time =~ m/^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:\d{2})?$/) { + elsif ($time =~ m/^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/) { $year = $1; $month = $2; $day = $3; $hour = $4; $min = $5; + $sec = $7; } else { warn "Date/Time format ($time) unrecogonzied"; @@ -171,6 +172,9 @@ sub format_time { if (defined $year) { $time = "$year-$month-$day $hour:$min"; + if (defined $sec) { + $time .= ":$sec"; + } $time .= " " . &::Param('timezone') if &::Param('timezone'); } return $time; -- cgit v1.2.3-24-g4f1b