Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_log_module.c @ 5417:3169a9b2250d stable-1.4
Win32: $request_time fixed.
On win32, time_t is 64 bits wide by default, and passing an ngx_msec_int_t
argument for %T format specifier doesn't work. This doesn't manifest itself
on other platforms as time_t and ngx_msec_int_t are usually of the same size.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 04 Sep 2013 20:48:30 +0400 |
parents | 3849bb380605 |
children |
comparison
equal
deleted
inserted
replaced
5416:ddf740b9fdf6 | 5417:3169a9b2250d |
---|---|
778 | 778 |
779 ms = (ngx_msec_int_t) | 779 ms = (ngx_msec_int_t) |
780 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); | 780 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); |
781 ms = ngx_max(ms, 0); | 781 ms = ngx_max(ms, 0); |
782 | 782 |
783 return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000); | 783 return ngx_sprintf(buf, "%T.%03M", (time_t) ms / 1000, ms % 1000); |
784 } | 784 } |
785 | 785 |
786 | 786 |
787 static u_char * | 787 static u_char * |
788 ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) | 788 ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) |