Bug 57339

Summary: ErrorLogFormat doesn't allow logging in Internet date/time format
Product: Apache httpd-2 Reporter: Marten Lehmann <lehmann>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement CC: michaelo
Priority: P2    
Version: 2.4.10   
Target Milestone: ---   
Hardware: All   
OS: Linux   

Description Marten Lehmann 2014-12-10 18:40:06 UTC
The ErrorLogFormat directive allows to log records with a format, that comes close to the Internet date/time format: ISO 8601 date + time without time zone

Format string: %{cu}t
Example timestamp: 2014-12-10 19:05:38.192439



This however is not enough if you are operating internationally and need to login in full Internet date/time format:

Example timestamp: 2014-12-10T19:05:38.192439+01:00

(Details: https://tools.ietf.org/html/rfc3339#section-5.8)

Actually, ISO 8601 specifies everything that is required, but the current httpd simply doesn't implement a timestamp that matches Wikipedias documentation:

Combined date and time in UTC: 2014-12-10T17:05:33+00:00 or 2014-12-10T17:05:33Z

I would be totally satisfied if Apache would at least support logging with a UTC timestamp:

Example timestamp: 2014-12-10T18:05:38.192439Z

ErrorLogFormat doesn't (yet) come with the %{format}t format string to be more flexible in specifying the format.

(Details: http://httpd.apache.org/docs/current/mod/mod_log_config.html)
Comment 1 Michael Osipov 2019-07-30 11:52:34 UTC
Actually, the current format isn't proper ISO 8601 because the 'T' separator is missing.

For those who operate internationally shall use 'Etc/UTC' on their servers, thus making the TZ offset redundant.