]> git.kaiwu.me - nginx.git/commitdiff
Upstream: fixed $upstream_response_time format specifiers.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 4 Sep 2013 17:30:09 +0000 (21:30 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 4 Sep 2013 17:30:09 +0000 (21:30 +0400)
src/http/ngx_http_upstream.c

index f4221eddefd511f0f2caf4b3cad43c63fa1e23e7..0d0d1916598d50f421106f754cb877609f786113 100644 (file)
@@ -4309,7 +4309,7 @@ ngx_http_upstream_response_time_variable(ngx_http_request_t *r,
             ms = (ngx_msec_int_t)
                      (state[i].response_sec * 1000 + state[i].response_msec);
             ms = ngx_max(ms, 0);
-            p = ngx_sprintf(p, "%d.%03d", ms / 1000, ms % 1000);
+            p = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000);
 
         } else {
             *p++ = '-';