]> granicus.if.org Git - pgbadger/commitdiff
Fix --end bug, was set to same date as --begin. Thanks to Andrzej Zawadzki for the...
authorDarold Gilles <gilles@darold.net>
Fri, 11 Oct 2013 13:23:26 +0000 (15:23 +0200)
committerDarold Gilles <gilles@darold.net>
Fri, 11 Oct 2013 13:23:26 +0000 (15:23 +0200)
pgbadger

index cf253cb8e07b66b733d562424f1798b8ee66ff06..45480d38a4d485e3d5b0e838a7913bf15d0d5e63 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -522,7 +522,7 @@ if ($to) {
                die "FATAL: bad format for ending datetime, should be yyyy-mm-dd hh:mm:ss.l+tz\n";
        } else {
                 my $fractional_seconds = $7 || "0";
-                $from = "$1-$2-$3 $4:$5:$6.$7"
+                $to = "$1-$2-$3 $4:$5:$6.$7"
         }
 }
 
@@ -1264,7 +1264,7 @@ sub process_file
 
                                        # Skip unwanted lines
                                        next if ($from && ($from gt $prefix_vars{'t_timestamp'}));
-                                       if ($to   && ($to lt $prefix_vars{'t_timestamp'})) {
+                                       if ($to && ($to lt $prefix_vars{'t_timestamp'})) {
                                                if ($tmpoutfile) {
                                                        $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n");
                                                        $old_queries_count = $overall_stat{'queries_number'};
@@ -1369,7 +1369,7 @@ sub process_file
 
                                        # Skip unwanted lines
                                        next if ($from && ($from gt $prefix_vars{'t_timestamp'}));
-                                       if ($to   && ($to lt $prefix_vars{'t_timestamp'})) {
+                                       if ($to && ($to lt $prefix_vars{'t_timestamp'})) {
                                                if ($tmpoutfile) {
                                                        $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n");
                                                        $old_queries_count = $overall_stat{'queries_number'};