You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Foster, Stephen (ASPIRE)" <st...@hmrcaspire.com> on 2010/04/07 14:25:07 UTC

[users@httpd] Timestamps of access log entries

Hi there,

 

I am having troubles with the switch over between GMT and BST with
respect to the entries going in the log files, I am using apache 2.0.55
BTW.

 

The timezones on our servers are set to GB and during British Wintertime
the log file entries are stamped correctly, however when moving to BST I
have to add the following to the apache startup script to get the
timestamps in BST format.

 

TZ=GMT0BST

export TZ

 

And obviously remember to take this out when returning back to GMT in
October.

 

For the actual logfile configuration I use the following:

 

Logformat "%{%Y-%m-%d %H:%M:%S}t %{X-Forwarded-For}i %{host}i %r %s %b
%D %q %{User-Agent}i %{IR_PORTAL_COOKIE}C %{Referer}i" ORU_extended

CustomLog "|/opt/app/apache/bin/rotatelogs
/opt/app/apache/logs/site_access_log.%Y-%m-%d 86400" ORU_extended

 

Is there any other way of ensuring the correct localtime gets put into
the logfile entries?? I have tried using %X in place of %H:%M:%S but
this has no effect.

 

Cheers

 

Steve

 

 

 

 

 

 


Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at No. 1 Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

RE: [users@httpd] Timestamps of access log entries

Posted by Geoff Millikan <gm...@t1shopper.com>.
Why not change the timezone on the whole server, not just Apache?

RE: [users@httpd] Timestamps of access log entries

Posted by "Foster, Stephen (ASPIRE)" <st...@hmrcaspire.com>.
Hi there,

 

I've not had any responses to this problem so I assume no one else has
the same issues. Any offers?

 

I've already tried changing the timestamp strings in the log format to
localized but this appears to have made no difference...

 

Cheers

 

Steve

 

________________________________

From: Foster, Stephen (ASPIRE) 
Sent: 07 April 2010 13:25
To: users@httpd.apache.org
Subject: [users@httpd] Timestamps of access log entries

 

Hi there,

 

I am having troubles with the switch over between GMT and BST with
respect to the entries going in the log files, I am using apache 2.0.55
BTW.

 

The timezones on our servers are set to GB and during British Wintertime
the log file entries are stamped correctly, however when moving to BST I
have to add the following to the apache startup script to get the
timestamps in BST format.

 

TZ=GMT0BST

export TZ

 

And obviously remember to take this out when returning back to GMT in
October.

 

For the actual logfile configuration I use the following:

 

Logformat "%{%Y-%m-%d %H:%M:%S}t %{X-Forwarded-For}i %{host}i %r %s %b
%D %q %{User-Agent}i %{IR_PORTAL_COOKIE}C %{Referer}i" ORU_extended

CustomLog "|/opt/app/apache/bin/rotatelogs
/opt/app/apache/logs/site_access_log.%Y-%m-%d 86400" ORU_extended

 

Is there any other way of ensuring the correct localtime gets put into
the logfile entries?? I have tried using %X in place of %H:%M:%S but
this has no effect.

 

Cheers

 

Steve

 

 

 

 

 

 

Capgemini is a trading name used by the Capgemini Group of companies
which includes Capgemini UK plc, a company registered in England and
Wales (number 943935) whose registered office is at No. 1 Forge End,
Woking, Surrey, GU21 6DB.

This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message.


Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at No. 1 Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.