title: Writing the total request time in seconds to an nginx access log, possibly using a calculated variable
body: <p>I'm trying to modify my nginx access log format to include the request duration, in seconds.</p>
  
  <p>I see two possible variables I could use:</p>
  
  <p>1) <a href="http://wiki.nginx.org/HttpLogModule#log_format" rel="noreferrer"><code>$request_time</code></a></p>
  
  <p>2) <a href="http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_response_time" rel="noreferrer"><code>$upstream_response_time</code></a></p>
  
  <p>However both of these variables are expressed in microseconds, and I need this value to be rendered in seconds. Is there any way to specify the output as an expression (i.e. <code>$request_time * 1000</code>) or accomplish this in some other way?</p>
  
  <p>Thanks</p>