[nginx] Upstream: fixed $upstream_response_time format specifiers.

Maxim Dounin mdounin at mdounin.ru
Wed Sep 4 17:37:11 UTC 2013


details:   http://hg.nginx.org/nginx/rev/cd46297325bd
branches:  
changeset: 5368:cd46297325bd
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Wed Sep 04 21:30:09 2013 +0400
description:
Upstream: fixed $upstream_response_time format specifiers.

diffstat:

 src/http/ngx_http_upstream.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4309,7 +4309,7 @@ ngx_http_upstream_response_time_variable
             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++ = '-';



More information about the nginx-devel mailing list