diff options
author | travis%sedsystems.ca <> | 2005-01-12 02:15:42 +0100 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-01-12 02:15:42 +0100 |
commit | 16101ff8da5257bbb86f30ff9dae08369e5dcd09 (patch) | |
tree | 91d90ac7b53a6290806ca32f376db9f39b1304c7 /Bugzilla | |
parent | 4f5cad994b3786713c79b831e3af48ea7fe3a9b0 (diff) | |
download | bugzilla-16101ff8da5257bbb86f30ff9dae08369e5dcd09.tar.gz bugzilla-16101ff8da5257bbb86f30ff9dae08369e5dcd09.tar.xz |
Bug 276473: Show_activity merges incorrectly sometimes changesets into one changeset
Patch by vladd@bugzilla.org r=bugzilla@glob.com.au a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Util.pm | 8 |
1 files changed, 6 insertions, 2 deletions
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; |