[PATCH] Variable $time_short.
gmm at csdoc.com
Thu May 27 18:48:41 UTC 2021
On 27.05.2021 20:25, Maxim Dounin wrote:
>> Variable $time_short.
>> Variable $time_short in form "1970/09/28 12:00:00".
>> Added to ngx_http_core_module, ngx_http_log_module,
>> and ngx_stream_core_module.
> You may want to be more specific about expected use cases, and why
> existing time variables are not enough.
Main purpose of variable $time_short is usage for logging, access.log.
Existing variables $time_iso8601 and $time_local has bad readability,
because these variables contains timezone after seconds and it has
no space between date and time fields.
But only proposed variable $time_short has excellent readability,
also this variable is very short, and contains no visual garbage.
If name $time_short is not very good - I can rewrite
my patch and rename it to just $time variable name.
log_format standalone '$time_short\t$geoip_country_code\t$remote_addr'
More information about the nginx-devel