From: Darold Gilles Date: Tue, 30 Jun 2015 16:03:01 +0000 (+0200) Subject: Try to fix a potential issue in log start/end date parsing. Thanks to gityerhubhere... X-Git-Tag: v7.1~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9421029e143b5247632afabac052b3704c7a8a3;p=pgbadger Try to fix a potential issue in log start/end date parsing. Thanks to gityerhubhere for the report. --- diff --git a/pgbadger b/pgbadger index 000b892..e0cab56 100755 --- a/pgbadger +++ b/pgbadger @@ -8585,11 +8585,11 @@ sub dump_as_html &print_overall_statistics(); # Set graphs limits - $overall_stat{'first_log_ts'} =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; + $overall_stat{'first_log_ts'} =~ /^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; $t_min = timegm_nocheck(0, $5, $4, $3, $2 - 1, $1) * 1000; $t_min -= ($avg_minutes * 60000); - $overall_stat{'last_log_ts'} =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; + $overall_stat{'last_log_ts'} =~ /^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; $t_max = timegm_nocheck(59, $5, $4, $3, $2 - 1, $1) * 1000; $t_max += ($avg_minutes * 60000);