ldap/admin/src/logconv.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 87f5ef5a97437cc92afe2496cd06e5d2ec71d9ff
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Apr 22 20:28:14 2013 -0600
Ticket #47341 - logconv.pl -m time calculation is wrong
https://fedorahosted.org/389/ticket/47341
Reviewed by: nkinder (Thanks!)
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
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 );