You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Monte Ohrt <mo...@ispi.net> on 2000/11/01 16:50:27 UTC

feature request: timezone setting per virtual host?

Hi,

I'm not sure if this has been discussed before, I didn't find anything
in the mailing list archives. Is it possible for each virtual host in
apache to have its own timezone setting? Then access_log timestamps
would be based on the timezone of that virtual host, and not necessarily
the local time of the web server.

This feature would make access log reports much simpler. For instance,
if you have several clients from different timezones hosted on one
system, this eases the need to convert all the logs to another timezone
(offset from localtime) within the log analyzing program. It would be
much more efficient to correct this at the source (apache log file).

Thoughts on this? Would this feature have any affects that would really
hose something else up that I'm not thinking of?

Re: feature request: timezone setting per virtual host?

Posted by Tony Finch <do...@dotat.at>.
Monte Ohrt <mo...@ispi.net> wrote:
>
>I'm not sure if this has been discussed before, I didn't find anything
>in the mailing list archives. Is it possible for each virtual host in
>apache to have its own timezone setting?

It could be done by calling tzset() at the beginning of
log_request_time() in mod_log_config, according to some new TimeZone
configuratioon directive. However this would not be very efficient
since tzset involves loading and interpreting a file.

>This feature would make access log reports much simpler. For instance,
>if you have several clients from different timezones hosted on one
>system, this eases the need to convert all the logs to another timezone
>(offset from localtime) within the log analyzing program. It would be
>much more efficient to correct this at the source (apache log file).

It depends on how you are handling your logs :-) if you log them to
one place and split them per-customer after the fact then it is more
efficient to do timezone fix-up at that time.

I personally prefer to do everything in UTC in order to avoid
ambiguity, especially because governments insist on fooling around
with the clocks twice a year for no good reason.

Tony.
-- 
en oeccget g mtcaa    f.a.n.finch
v spdlkishrhtewe y    dot@dotat.at
eatp o v eiti i d.    fanf@covalent.net