comparison src/core/ngx_times.c @ 6481:40bea39731d7

Fixed format specifiers in ngx_sprintf().
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 31 Mar 2016 02:34:00 +0300
parents 777202558122
children 63699a40e2ff
comparison
equal deleted inserted replaced
6480:f01ab2dbcfdc 6481:40bea39731d7
152 tm.ngx_tm_min, tm.ngx_tm_sec); 152 tm.ngx_tm_min, tm.ngx_tm_sec);
153 153
154 154
155 p2 = &cached_http_log_time[slot][0]; 155 p2 = &cached_http_log_time[slot][0];
156 156
157 (void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d", 157 (void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02i%02i",
158 tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], 158 tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],
159 tm.ngx_tm_year, tm.ngx_tm_hour, 159 tm.ngx_tm_year, tm.ngx_tm_hour,
160 tm.ngx_tm_min, tm.ngx_tm_sec, 160 tm.ngx_tm_min, tm.ngx_tm_sec,
161 tp->gmtoff < 0 ? '-' : '+', 161 tp->gmtoff < 0 ? '-' : '+',
162 ngx_abs(tp->gmtoff / 60), ngx_abs(tp->gmtoff % 60)); 162 ngx_abs(tp->gmtoff / 60), ngx_abs(tp->gmtoff % 60));
163 163
164 p3 = &cached_http_log_iso8601[slot][0]; 164 p3 = &cached_http_log_iso8601[slot][0];
165 165
166 (void) ngx_sprintf(p3, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d", 166 (void) ngx_sprintf(p3, "%4d-%02d-%02dT%02d:%02d:%02d%c%02i:%02i",
167 tm.ngx_tm_year, tm.ngx_tm_mon, 167 tm.ngx_tm_year, tm.ngx_tm_mon,
168 tm.ngx_tm_mday, tm.ngx_tm_hour, 168 tm.ngx_tm_mday, tm.ngx_tm_hour,
169 tm.ngx_tm_min, tm.ngx_tm_sec, 169 tm.ngx_tm_min, tm.ngx_tm_sec,
170 tp->gmtoff < 0 ? '-' : '+', 170 tp->gmtoff < 0 ? '-' : '+',
171 ngx_abs(tp->gmtoff / 60), ngx_abs(tp->gmtoff % 60)); 171 ngx_abs(tp->gmtoff / 60), ngx_abs(tp->gmtoff % 60));