From 031ab02c30431f2a3768af5c14f50be8a27b33ad Mon Sep 17 00:00:00 2001 From: Darold Date: Wed, 18 Apr 2012 17:07:43 +0200 Subject: [PATCH] Fix sort order of days/hours into hours array --- pgbadger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgbadger b/pgbadger index c9dead1..1c63047 100755 --- a/pgbadger +++ b/pgbadger @@ -961,11 +961,11 @@ sub dump_as_html }; - foreach my $d (sort keys %per_hour_info) { + foreach my $d (sort {$a <=> $b} keys %per_hour_info) { my $c = 1; $d =~ /^\d{4}(\d{2})(\d{2})$/; my $zday = "$abbr_month{$1} $2"; - foreach my $h (sort keys %{$per_hour_info{$d}}) { + foreach my $h (sort {$a <=> $b} keys %{$per_hour_info{$d}}) { my $colb = $c % 2; $zday = " " if ($c > 1); $per_hour_info{$d}{$h}{average} = $per_hour_info{$d}{$h}{duration} / ($per_hour_info{$d}{$h}{count} || 1); -- 2.40.0