comparison src/core/ngx_times.c @ 517:dadfa78d2270 release-0.1.33

nginx-0.1.33-RELEASE import *) Bugfix: nginx could not be built with the --without-pcre parameter; the bug had appeared in 0.1.29. *) Bugfix: 3, 4, 7, and 8 the "proxy_set_header" directives in one level cause the bus fault on start up. *) Bugfix: the HTTP protocol was specified in the HTTPS redirects. *) Bugfix: if the "rewrite" directive used the captures inside the "if" directive, then the 500 error code was returned.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 23 May 2005 12:07:45 +0000
parents 9b8c906f6e63
children 09b42134ac0c
comparison
equal deleted inserted replaced
516:ea9642a65514 517:dadfa78d2270
153 ngx_gmtime(s, &ngx_cached_gmtime); 153 ngx_gmtime(s, &ngx_cached_gmtime);
154 154
155 155
156 p = cached_http_time[slot]; 156 p = cached_http_time[slot];
157 157
158 ngx_sprintf(p, "%s, %02d %s %4d %02d:%02d:%02d GMT", 158 (void) ngx_sprintf(p, "%s, %02d %s %4d %02d:%02d:%02d GMT",
159 week[ngx_cached_gmtime.ngx_tm_wday], 159 week[ngx_cached_gmtime.ngx_tm_wday],
160 ngx_cached_gmtime.ngx_tm_mday, 160 ngx_cached_gmtime.ngx_tm_mday,
161 months[ngx_cached_gmtime.ngx_tm_mon - 1], 161 months[ngx_cached_gmtime.ngx_tm_mon - 1],
162 ngx_cached_gmtime.ngx_tm_year, 162 ngx_cached_gmtime.ngx_tm_year,
163 ngx_cached_gmtime.ngx_tm_hour, 163 ngx_cached_gmtime.ngx_tm_hour,
164 ngx_cached_gmtime.ngx_tm_min, 164 ngx_cached_gmtime.ngx_tm_min,
165 ngx_cached_gmtime.ngx_tm_sec); 165 ngx_cached_gmtime.ngx_tm_sec);
166 166
167 ngx_cached_http_time.data = p; 167 ngx_cached_http_time.data = p;
168 168
169 169
170 #if (NGX_HAVE_GETTIMEZONE) 170 #if (NGX_HAVE_GETTIMEZONE)
173 ngx_gmtime(s + ngx_gmtoff * 60, &tm); 173 ngx_gmtime(s + ngx_gmtoff * 60, &tm);
174 174
175 #elif (NGX_HAVE_GMTOFF) 175 #elif (NGX_HAVE_GMTOFF)
176 176
177 ngx_localtime(&tm); 177 ngx_localtime(&tm);
178 ngx_gmtoff = tm.ngx_tm_gmtoff / 60; 178 ngx_gmtoff = (ngx_int_t) (tm.ngx_tm_gmtoff / 60);
179 179
180 #else 180 #else
181 181
182 ngx_localtime(&tm); 182 ngx_localtime(&tm);
183 ngx_gmtoff = ngx_timezone(tm.ngx_tm_isdst); 183 ngx_gmtoff = ngx_timezone(tm.ngx_tm_isdst);
185 #endif 185 #endif
186 186
187 187
188 p = cached_err_log_time[slot]; 188 p = cached_err_log_time[slot];
189 189
190 ngx_sprintf(p, "%4d/%02d/%02d %02d:%02d:%02d", 190 (void) ngx_sprintf(p, "%4d/%02d/%02d %02d:%02d:%02d",
191 tm.ngx_tm_year, tm.ngx_tm_mon, 191 tm.ngx_tm_year, tm.ngx_tm_mon,
192 tm.ngx_tm_mday, tm.ngx_tm_hour, 192 tm.ngx_tm_mday, tm.ngx_tm_hour,
193 tm.ngx_tm_min, tm.ngx_tm_sec); 193 tm.ngx_tm_min, tm.ngx_tm_sec);
194 194
195 ngx_cached_err_log_time.data = p; 195 ngx_cached_err_log_time.data = p;
196 196
197 197
198 p = cached_http_log_time[slot]; 198 p = cached_http_log_time[slot];
199 199
200 ngx_sprintf(p, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d", 200 (void) ngx_sprintf(p, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d",
201 tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], 201 tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],
202 tm.ngx_tm_year, tm.ngx_tm_hour, 202 tm.ngx_tm_year, tm.ngx_tm_hour,
203 tm.ngx_tm_min, tm.ngx_tm_sec, 203 tm.ngx_tm_min, tm.ngx_tm_sec,
204 ngx_gmtoff < 0 ? '-' : '+', 204 ngx_gmtoff < 0 ? '-' : '+',
205 abs(ngx_gmtoff / 60), abs(ngx_gmtoff % 60)); 205 abs(ngx_gmtoff / 60), abs(ngx_gmtoff % 60));
206 206
207 ngx_cached_http_log_time.data = p; 207 ngx_cached_http_log_time.data = p;
208 208
209 209
210 #if (NGX_THREADS) 210 #if (NGX_THREADS)