views:

141

answers:

3

Hi,

When I restart my apache2 and reload a page, the log file shows

boogie.tontut.fi - - [28/Oct/2008:03:27:49 +0200] "GET /test HTTP/1.1" 404 457 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"

...as supposed to, as it's 03:27:49 now. However, when I click the refresh button again, the new log entry is:

boogie.tontut.fi - - [27/Oct/2008:21:27:52 -0400] "GET /test HTTP/1.1" 404 457 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"

Offset has changed from +0200 to -0400 and I have no clue where this comes from.

Does any of you know where to start troubleshooting this problem? Thank you for your answers.

-Samuli

A: 

Try and set your timezone explicitly in the httpd.conf

SetEnv TZ GMT+2
Kevin Hakanson
Nope, doesn't help. I tried adding it to apache2.conf as well as in <VirtualHost>.. :/
boogie
A: 

Maybe looking at the system call would help; on Unix its gettimeofday and on Windows its GetSystemTime.

Martin Redmond
A: 

Isn't it possible that something that runs in apache is changing locale settings in its environment?

Something like:

  1. first reload: log message GMT+2
  2. apache runs /weird_script.php that calls some kind of setlocale()
  3. second reload, new enviroment setting in effect, results in log message GMT-4
che