httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: fixes for Apache 1.1.1 bugs when computing time zones for logs
Date Mon, 04 Nov 1996 19:31:55 GMT

I've worked this patch against the current tree, and sent Paul the patched
source to try out.  If it comes back positive I think we should commit it.
Thoughts?

	Brian

> Paul Eggert wrote:
> >
> >Email address: eggert@twinsun.com
> >1-line summary: fixes for Apache 1.1.1 bugs when computing time zones for logs
> >OS: Solaris 2.5.1
> >Apache version: 1.1.1
> >Extra modules used: none
> >Symptoms:
> >
> >* When the time zone is not an integral multiple of 1 hour,
> >the logs report bogus UTC offsets.  E.g. if the time zone
> >is +0530 the reported UTC offset is +051800.
> >
> >* If !defined(HAS_GMTOFF) && !defined(NO_TIMEZONE), when the
> >daylight-saving offset is not exactly 1 hour, the logs compute the UTC
> >offset incorrectly when daylight saving is in effect.
> >
> >* If !defined(HAS_GMTOFF) && defined(NO_TIMEZONE), the code invokes
> >mktime twice, once on the output of localtime and once on the output
> >of gmtime, and subtracts the results.  This method is incorrect when
> >the time is near a daylight-saving shift boundary.  For example,
> >suppose we are in US Pacific time and the current time is 1996-10-27
> >00:00:00 local time, just before a daylight saving time shift.  The
> >correct UTC offset is -0700, but in this case get_gmtoff incorrectly
> >computes an offset of -0800, because mktime(gmtime(...)) applies
> >mktime to `1996-10-27 07:00:00' (actually a UTC time, not a local
> >time) and the UTC offset as of 1996-10-27 07:00:00 local time is -0800.
> >
> >
> >Here is a patch.  The key idea of the patch, which you'll find at the
> >end, is an idea stolen from INN 1.5b1: assume that we are no more than
> >24 hours away from UTC, which is a reasonable assumption (among other
> >things, Posix requires support only for -2400 through +2400 time
> >zones).

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Mime
View raw message