Thursday, March 10, 2005

IIS time logging

Time found in IIS W3C log file is set to GMT. So AWstats shows logs in GMT, very weird. Google it, find the explanation here:

I use IIS and there's a difference between local hour and AWStats reported hour. For example I made a hit on a page at 4:00 and AWStats report I hit it at 2:00.
This is not a problem of time in your local client host. AWStats use only time reported in logs by your server and all time are related to server hour. The problem is that IIS in some foreign versions puts GMT time in its log file (and not local time). So, you have also GMT time in your statistics.
You can wait that Microsoft change this in next IIS versions. However, Microsoft sheet Q271196 "IIS Log File Entries Have the Incorrect Date and Time Stamp" says:
The selected log file format is the W3C Extended Log File Format. The extended log file format is defined in the W3C Working Draft WD-logfile-960323 specification by Phillip M. Hallam-Baker and Brian Behlendorf. This document defines the Date and Time files to always be in GMT. This behavior is by design.
So this means this way of working might never be changed, so another chance is to use the AWStats plugin 'timezone'. Warning, this plugin need the perl module Time::Local and it reduces seriously AWStats speed.
To enable the plugin, uncomment the following line in your config file.
LoadPlugin="timezone TZ"
where TZ is value of your signed timezone (+2 for Paris, -8 for ...)


Post a Comment

<< Home