From: Vincent Picavet Date: Thu, 31 May 2012 17:18:40 +0000 (+0000) Subject: Fix false cur_date when using syslog and allow -b and -e options to work. X-Git-Tag: v3.2~236^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06c962929ac381b2960924f3ee1a233d5dcc22bb;p=pgbadger Fix false cur_date when using syslog and allow -b and -e options to work. --- diff --git a/pgbadger b/pgbadger index c72fa07..1b3e46b 100755 --- a/pgbadger +++ b/pgbadger @@ -337,7 +337,7 @@ while (my $line = <$lfile>) { $tmp_year = substr($CURRENT_DATE,1, 4) - 1; } # Skip unwanted lines - my $cur_date = "$tmp_year$1$2$3$4$5"; + my $cur_date = "$tmp_year$month_abbr{$1}$2$3$4$5"; next if ($from && ($from > $cur_date)); last if ($to && ($to < $cur_date)); # Process the log line