Home > AXS Visitor Tracking > Help > 1509

Adjusting time zone of logged visits

By default, visits are logged using the local time of the web server on which the logging script runs.

In some cases, webmasters will want to view their data with reference to a different time zone than the one in which data was logged. To do this, edit the logging script "ax.pl" or "ax.cgi". Find the variable assignment:

my $TimeOffsetInHours = 0;

Adjust the offset by the appropriate amount. If you are in Seattle (Pacific time) and your web server is in Pennsylvania (Eastern time), then you will need to subtract three hours because at any given time, Seattle is exactly three hours behind Pennsylvania:

my $TimeOffsetInHours = -3;

After customizing the ax.pl script, you should start a new log file. If you do not do this, you will have a wrinkle in the log data in which three hours (or however many) of data is overlapped.

Bugs: from a design perspective, it would be better to log all visits in a universal GMT time and to then adjust the time zone when the data is viewed. That would allow the same data set to remain valid as various people translate the data into various time zones. However, it wasn't designed that way and for the time being we are stuck with that initial poor design choice. Someday things may be better.

    "Adjusting time zone of logged visits"