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.
我在运行Debian的VPS服务器上运行Apache 2。我最近将服务器上的时区(使用dpkg-reconfigure tzdata)从America / New_York更改为America / Los_Angeles以匹配我在全国范围内的移动。自从进行更改后,我还重新启动了虚拟机。
However, the Apache processes seem to flitter between timezones. See this snippet from the access_log:
但是,Apache进程似乎在时区之间徘徊。请参阅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?
它从23:01跳到02:01然后回来。知道我怎么能保持一致吗?
3 个解决方案
#1
1
Are you by any chance using ntpd and the peers against which you synchronize are flaky?
您是否有机会使用ntpd和您同步的同行是片状?
#2
1
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!
事实证明,我在这个Apache实例上运行了两个Django项目,其中一个我已经修复指向America / Los_Angeles,但另一个我留下了。根据创建新Apache进程时首先访问的应用程序,它会破坏时区!
#3
0
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?
可能有些Apache工作进程在您更改时区之前已启动,有些之后也是如此。自从更改系统时区设置后,您是否已完全停止并重新启动Apache?
#1
1
Are you by any chance using ntpd and the peers against which you synchronize are flaky?
您是否有机会使用ntpd和您同步的同行是片状?
#2
1
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!
事实证明,我在这个Apache实例上运行了两个Django项目,其中一个我已经修复指向America / Los_Angeles,但另一个我留下了。根据创建新Apache进程时首先访问的应用程序,它会破坏时区!
#3
0
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?
可能有些Apache工作进程在您更改时区之前已启动,有些之后也是如此。自从更改系统时区设置后,您是否已完全停止并重新启动Apache?