I have installed mysar and working well. The problem is only the report generated in wrong time zone.
Example output Details for a Specific Host, User, Date and Site is like this:
23:24:21 0.28K http://www.dyndns.org TCP_MISS/200
it should be
15:24:21 0.28K http://www.dyndns.org TCP_MISS/200
To proof it, then i generate report from SARG for comparison. The result is like this:
www.dyndns.org 09/12/2007 15:24:21
How to fix this problem? My machine time zone is GMT+8.
The current version of mysar doesn't support timezone correction.
You need to either change the local time of the computer running squid or reconfigure squid to log using a corrected timezone and not GMT.
Sorry Giannis, Having learned your code, i decide to remove $timezone_diff and it works for me. I was wrong giving opinion re UTC/GMT problem.
//while (($timezone_diff = (gmmktime() - mktime()))%10);
Thank you, now calculation between mysar and netams ip accounting are match.
Hmm, that line was an addition from a different user. I'll keep an option to enable or disable per choice.
I'm using squid-2.5.STABLE6-3 it seems doesn't support logformat localtime, can we manipulate mktime() in php to have correct localtime?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.