Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 "http://dhl-translation.accountis.net/" "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 "http://dhl-translation.accountis.net/" "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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

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

Look for something like:

SetEnv TZ GMT
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.