darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
125 stars 36 forks source link

Timezone default doesnt work with DST #201

Closed mikes-gh closed 5 years ago

mikes-gh commented 5 years ago

https://github.com/darold/squidanalyzer/blob/abd1ef84df5e2660ad942275f410fd22f9b64903/SquidAnalyzer.pm#L1617

Here the timezone calculation fails when timezone is not set and you are in DST.

For example I am TImeZone London/Dublin which is currently in BST (Britissh summer time). This causes the calculation to put me in time zone GMT +2. This caused the incremental log parsing to fail

darold commented 5 years ago

Have a look to #200 and let me know if setting TimeZone to +00 in the config file solve the issue too. In this case I will set it as the default.

mikes-gh commented 5 years ago

Yes setting +00 works but maybe the default timezone calculation could work better . If I get time I will have a look.

darold commented 5 years ago

Save your time, I already have the code to auto-detect the timezone. I will add it, backward compatibility may be broken but I will drop a warning in the release note.

darold commented 5 years ago

Commit 1bfd73c might solve this issue by correctly auto detecting timezone. Please give a try to latest development without setting TImeZone directive. Let me know.

mikes-gh commented 5 years ago

Ill report back had meeting today.