Timestamp in log

Maxim Dounin mdounin at mdounin.ru
Thu Nov 19 13:10:36 UTC 2015


On Wed, Nov 18, 2015 at 10:36:07PM -0800, Frank Liu wrote:

> I understand nginx writes the log when request completes, but is time_local
> (or time_iso8601, msec) representing the time that the request was received
> or when the request completes and log written? I know Apache and AWS ELB
> both log the request received time, and want to see nginx works the same.

Both are current time, i.e., the time of the log write.  This is 
explicitly documented here at 

: $msec
: time in seconds with a milliseconds resolution at the time of the 
: log write

If you want to obtain time of the request start, subtract 

Maxim Dounin

More information about the nginx mailing list