darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.51k stars 349 forks source link

-b or --begin timestamp format without timezone #713

Closed wibrt closed 2 years ago

wibrt commented 2 years ago

As documented: start date/time for the data to be parsed in log (either a timestamp or a time)

Running pgbadger with the timezone does not get processed, without it does get processed, i haven't checked how that timezoneinfo in the postgresql/pgbouncer log files is handled then

Can anyone confirm this?, steps to reproduce:

`# pgbadger -X -I --noclean -b "2022-01-17 00:00:00.000+CET" /var/log/postgresql/postgresql.log -O /var/www/pgbadger/ FATAL: bad format for begin datetime/time, should be yyyy-mm-dd hh:mm:ss.l+tz or hh:mm:ss.l+tz

more info: # head /var/log/postgresql/postgresql.log 2022-01-30 00:08:42.390 CET [15462] ...

darold commented 2 years ago

tz must be a digit, for example: ...+01