Question

I have Apache 2 running on a VPS server (running Debian). I recently changed the timezone on the server (using dpkg-reconfigure tzdata) from America/New_York to America/Los_Angeles to match my move across country. I have also rebooted the virtual machine since making the change.

However, the Apache processes seem to flitter between timezones. See this snippet from the access_log:

127.0.0.1 - - [02/Oct/2008:23:01:13 -0700] "GET /favicon.ico HTTP/1.0" 301 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3"
127.0.0.1 - - [03/Oct/2008:02:01:25 -0400] "GET /tag/wikipedia/?page=1 HTTP/1.0" 200 5984 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
127.0.0.1 - - [03/Oct/2008:02:01:36 -0400] "GET /index.atom HTTP/1.0" 200 7648 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.2) Gecko/2008091618 Firefox/3.0.2"
127.0.0.1 - - [03/Oct/2008:02:01:45 -0400] "GET /tag/moblog/ HTTP/1.0" 200 6563 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"
127.0.0.1 - - [02/Oct/2008:23:01:46 -0700] "GET /tag/opensource/ HTTP/1.0" 200 5954 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"
127.0.0.1 - - [03/Oct/2008:02:01:56 -0400] "GET /tag/dopplr/ HTTP/1.0" 200 3407 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"

It jumps from 23:01 to 02:01 and back. Any idea how I can keep it consistent?

Was it helpful?

Solution 2

As it turns out, I had two Django projects running on this Apache instance, one of which I had fixed to point to America/Los_Angeles, but the other I had left behind. Depending on which app was accessed first when a new Apache process was created, it would muck up the time zone!

OTHER TIPS

Are you by any chance using ntpd and the peers against which you synchronize are flaky?

Possibly some of the Apache worker processes were started before you changes the timezone, and some afterwards. Have you completely stopped and re-started Apache since changing the system timezone setting?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top