comparison src/http/ngx_http_variables.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 f7fe817c92a2
children
comparison
equal deleted inserted replaced
5416:ddf740b9fdf6 5417:3169a9b2250d
1986 1986
1987 ms = (ngx_msec_int_t) 1987 ms = (ngx_msec_int_t)
1988 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); 1988 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
1989 ms = ngx_max(ms, 0); 1989 ms = ngx_max(ms, 0);
1990 1990
1991 v->len = ngx_sprintf(p, "%T.%03M", ms / 1000, ms % 1000) - p; 1991 v->len = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000) - p;
1992 v->valid = 1; 1992 v->valid = 1;
1993 v->no_cacheable = 0; 1993 v->no_cacheable = 0;
1994 v->not_found = 0; 1994 v->not_found = 0;
1995 v->data = p; 1995 v->data = p;
1996 1996