I've changed this but still not happy. This issue is that it's still possible for this to fail since it assumes that httpd and the test environ are setup "the same" regarding locale and timezone, which might not be the case.
My idea is to grab what httpd returns, pull the TZ from its response and *then* set the locale/TZ and pull the file stat info. This seems more reliable to me. On Jun 20, 2013, at 8:05 AM, Jim Jagielski <j...@jagunet.com> wrote: > > On Jun 20, 2013, at 7:56 AM, Jim Jagielski <j...@jagunet.com> wrote: > >> Thx for the feedback! Comments inline. >> >> On Jun 19, 2013, at 4:16 PM, Rainer Jung <rainer.j...@kippdata.de> wrote: >> >>> 2) include.t >>> ============ >>> >>> I noticed sporadic test failures for include.t when checking the file >>> time. The time zone expected by the test framework was CET, but the time >>> zone returned by mod_include was UTC. >>> >>> I noticed it only happens for the eventopt MPM and checked the code. I >>> found the function force_set_tz() that sets the TZ variable to UTC if it >>> is not already set. >>> >>> At this point I only wanted to note that this breaks include.t: >>> >>> # Failed test 59 in t/modules/include.t at line 349 >> >> I am guessing that a simple fix would be to adjust the test framework >> to use UTC... I did do some benchmarking and confirmed Paul's >> observation regarding the timezone issue. >> > > FWIW, this is the relevant section, which is quite wonky: > > # XXX: not sure about the locale thing, but it seems to work at least on my > # machine :) > POSIX->import('locale_h'); > my $oldloc = setlocale(&LC_TIME); > POSIX::setlocale(&LC_TIME, "C"); > >