andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From f6eef3cd99d0fe3ba3f93c75fb676907c2b12f61 Mon Sep 17 00:00:00 2001
dc8c34
From: Rich Megginson <rmeggins@redhat.com>
dc8c34
Date: Mon, 22 Apr 2013 20:28:14 -0600
dc8c34
Subject: [PATCH 128/225] Ticket #47341 - logconv.pl -m time calculation is
dc8c34
 wrong
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47341
dc8c34
Reviewed by: nkinder (Thanks!)
dc8c34
Branch: 389-ds-base-1.3.1
dc8c34
Fix Description: The variable name is $hr, not $hours.  The regex for the
dc8c34
sign in the timezone should have been (.) not (?).
dc8c34
Platforms tested: RHEL6 x86_64
dc8c34
Flag Day: no
dc8c34
Doc impact: no
dc8c34
(cherry picked from commit 87f5ef5a97437cc92afe2496cd06e5d2ec71d9ff)
dc8c34
(cherry picked from commit 1878bbfef7ae76ed18d709d5414e21cbd0961a38)
dc8c34
(cherry picked from commit eea06437c2be14fa9ab70dc983e2ab138f8d62c8)
dc8c34
(cherry picked from commit d1cae968b71409f93a41957d4851509ce0cbb8c5)
dc8c34
---
dc8c34
 ldap/admin/src/logconv.pl | 4 ++--
dc8c34
 1 file changed, 2 insertions(+), 2 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
dc8c34
index 757f799..3b8adc5 100755
dc8c34
--- a/ldap/admin/src/logconv.pl
dc8c34
+++ b/ldap/admin/src/logconv.pl
dc8c34
@@ -1574,7 +1574,7 @@ sub parseLineNormal
dc8c34
 		{
dc8c34
 		    # tz offset change
dc8c34
 		    $lastzone=$tzone;
dc8c34
-		    ($sign,$hr,$min) = $tzone =~ m/(?)(\d\d)(\d\d)/;
dc8c34
+		    ($sign,$hr,$min) = $tzone =~ m/(.)(\d\d)(\d\d)/;
dc8c34
 		    $tzoff = $hr*3600 + $min*60;
dc8c34
 		    $tzoff *= -1
dc8c34
 		    if $sign eq '-';
dc8c34
@@ -1582,7 +1582,7 @@ sub parseLineNormal
dc8c34
 		}
dc8c34
 		($date, $hr, $min, $sec) = split (':', $time);
dc8c34
 		($day, $mon, $yr) = split ('/', $date);
dc8c34
-		$newmin = timegm(0, $min, $hours, $day, $monthname{$mon}, $yr) - $tzoff;
dc8c34
+		$newmin = timegm(0, $min, $hr, $day, $monthname{$mon}, $yr) - $tzoff;
dc8c34
 		$gmtime = $newmin + $sec;
dc8c34
 		print_stats_block( $s_stats );
dc8c34
 		reset_stats_block( $s_stats, $gmtime, $time.' '.$tzone );
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34