Closed bbourgier closed 1 year ago
Yes, the problem is that the timestamps shown in the Javascript graphs are based on your client host timezone and not the one of the log file. You can adjust the timezone for those graphs when building pgbadger reports using the -Z or --timezone
option at command line. See pgbadger --help
for usage.
Hi,
Ok I can do as you say and set --timezone parameter manually. As my system timezone is "Europe/Paris", this is GMT+2 so I put: --timezone +2
this means my system time is GMT+2
And this fixes the JS graphs. See the screenshot.
However I was wondering why this does not work WITHOUT this parameter.
As my postgresql log lines are tagged with a timezone: 2022-09-09 00:10:01.034 CEST [525932]: [2-1] user=... And as CEST timezone is GMT+2 as well This should be possible to select the x-axis time scale for the JS graphs without having to offset manually. The drawback being that this offset may change depending on DST...
Well, thank you in any case for your answer.
Bertrand
This is just because sometimes there is no timezone information and some other time the client is not at the same timezone and historically pgbadger doesn't take care of the timezone in the logs. Maybe this could be improved by using an advanced Date/Time Perl module but this is not in the pgbadger development policy.
Hi,
There is a 2 hours time discrepancy between:
I attach screenshots for your comprehension.
Thanks in advance for your analysis and answers.
Bertrand
![postgreSQL Last Log File](https://user-images.githubusercontent.com/1629011/189305945-d9b1151d-77ab-4d5b-a1ed-c62646f8c542.jpg)