From 91a3f7d7b4567d15f9ab43ef9b03df078dc25379 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Mon, 22 Apr 2013 20:28:14 -0600 Subject: [PATCH] Ticket #47341 - logconv.pl -m time calculation is wrong https://fedorahosted.org/389/ticket/47341 Reviewed by: ??? Branch: master Fix Description: The variable name is $hr, not $hours. The regex for the sign in the timezone should have been (.) not (?). Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no --- ldap/admin/src/logconv.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl index 757f799..3b8adc5 100755 --- a/ldap/admin/src/logconv.pl +++ b/ldap/admin/src/logconv.pl @@ -1574,7 +1574,7 @@ sub parseLineNormal { # tz offset change $lastzone=$tzone; - ($sign,$hr,$min) = $tzone =~ m/(?)(\d\d)(\d\d)/; + ($sign,$hr,$min) = $tzone =~ m/(.)(\d\d)(\d\d)/; $tzoff = $hr*3600 + $min*60; $tzoff *= -1 if $sign eq '-'; @@ -1582,7 +1582,7 @@ sub parseLineNormal } ($date, $hr, $min, $sec) = split (':', $time); ($day, $mon, $yr) = split ('/', $date); - $newmin = timegm(0, $min, $hours, $day, $monthname{$mon}, $yr) - $tzoff; + $newmin = timegm(0, $min, $hr, $day, $monthname{$mon}, $yr) - $tzoff; $gmtime = $newmin + $sec; print_stats_block( $s_stats ); reset_stats_block( $s_stats, $gmtime, $time.' '.$tzone ); -- 1.7.1