Glam Prestige Journal

Bright entertainment trends with youth appeal.

Dates from my apache log are correct(ish) but in two different time zones.

For example...

10.3.1.1 - - [26/Jan/2011:10:57:34 +0200] "GET /html/js/jquery/jquery.bidi.js HTTP/1.1" 200 4328 "" "Mozilla/4.0 (compatible; MSIE 6.0; PPP v5.1 (1,1,1); Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
10.3.1.1 - - [26/Jan/2011:08:57:34 +0000] "GET /html/images/logo.png HTTP/1.1" 200 686 "" "Mozilla/4.0 (compatible; MSIE 6.0; PPP v5.1 (1,1,1); Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"

Any ideas on the cause of this and how to fix it?

2 Answers

Another process is interfering with your timezone settings.

There's a pretty concise answer to this at "what could cause Apache's time/timezone to change intermittently?". This can be particularly painful with Django -- as it doesn't handle juggling timezones very well -- and as such there are some good explanations in some Django-specific questions: Django timezone confusion and Django timezone mess

The solution, in short, is to normalise your timezone settings. Ideally, use something like UTC for both server and applications.

It seems that someone has set the environment variable TZ. This can possibly be done in .htaccess.

Look for something like:

SetEnv TZ GMT

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy