Skip to content

Instantly share code, notes, and snippets.

@josh-cain
Last active June 3, 2019 21:49
Show Gist options
  • Select an option

  • Save josh-cain/d7d69b1b93415b1324942bf896bbfa6d to your computer and use it in GitHub Desktop.

Select an option

Save josh-cain/d7d69b1b93415b1324942bf896bbfa6d to your computer and use it in GitHub Desktop.
LogFormat Directive for ISO 8601 Format @ Apache
# Don't forget, requires mod_log_config
# ISO 8601 Date format: %{%Y-%m-%dT%T}t.%{msec_frac}t%{%z}t
# I.E.
LogFormat "%{%Y-%m-%dT%T}t.%{msec_frac}t%{%z}t%{%z}t source-ip=%a user-agent=%{User-agent}i referer=%{Referer}i"
@ericovis

ericovis commented Jun 3, 2019

Copy link
Copy Markdown

This would be the right format %{%Y-%m-%dT%T}t%{%z}t yours is using timezone twice and also uses microseconds which is not something present in ISO 8601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment