comparison src/http/ngx_http_variables.c @ 5361:7094d6da2806

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 6b479db5b52b
children c21e341c51cb
comparison
equal deleted inserted replaced
5360:3d2d3e1cf427 5361:7094d6da2806
1990 1990
1991 ms = (ngx_msec_int_t) 1991 ms = (ngx_msec_int_t)
1992 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); 1992 ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
1993 ms = ngx_max(ms, 0); 1993 ms = ngx_max(ms, 0);
1994 1994
1995 v->len = ngx_sprintf(p, "%T.%03M", ms / 1000, ms % 1000) - p; 1995 v->len = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000) - p;
1996 v->valid = 1; 1996 v->valid = 1;
1997 v->no_cacheable = 0; 1997 v->no_cacheable = 0;
1998 v->not_found = 0; 1998 v->not_found = 0;
1999 v->data = p; 1999 v->data = p;
2000 2000