Mercurial > hg > nginx-vendor-0-7
comparison src/http/ngx_http_parse_time.c @ 372:6639b93e81b2 NGINX_0_6_30
nginx 0.6.30
*) Change: now if an "include" directive pattern does not match any
file, then nginx does not issue an error.
*) Feature: now the time in directives may be specified without spaces,
for example, "1h50m".
*) Bugfix: memory leaks if the "ssl_verify_client" directive was on.
Thanks to Chavelle Vincent.
*) Bugfix: the "sub_filter" directive might set text to change into
output.
*) Bugfix: the "error_page" directive did not take into account
arguments in redirected URI.
*) Bugfix: now nginx always opens files in binary mode under Cygwin.
*) Bugfix: nginx could not be built on OpenBSD; bug appeared in 0.6.15.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 29 Apr 2008 00:00:00 +0400 |
parents | 05693816539c |
children | 79c5df00501e |
comparison
equal
deleted
inserted
replaced
371:b6a2a305fdad | 372:6639b93e81b2 |
---|---|
238 | 238 |
239 #endif | 239 #endif |
240 | 240 |
241 /* | 241 /* |
242 * shift new year to March 1 and start months from 1 (not 0), | 242 * shift new year to March 1 and start months from 1 (not 0), |
243 * it is needed for Gauss's formula | 243 * it is needed for Gauss' formula |
244 */ | 244 */ |
245 | 245 |
246 if (--month <= 0) { | 246 if (--month <= 0) { |
247 month += 12; | 247 month += 12; |
248 year -= 1; | 248 year -= 1; |
249 } | 249 } |
250 | 250 |
251 /* Gauss's formula for Grigorian days from March 1, 1 BC */ | 251 /* Gauss' formula for Grigorian days since March 1, 1 BC */ |
252 | 252 |
253 return (365 * year + year / 4 - year / 100 + year / 400 | 253 return ( |
254 + 367 * month / 12 - 31 | 254 /* days in years including leap years since March 1, 1 BC */ |
255 + day | 255 |
256 365 * year + year / 4 - year / 100 + year / 400 | |
257 | |
258 /* days before the month */ | |
259 | |
260 + 367 * month / 12 - 30 | |
261 | |
262 /* days before the day */ | |
263 | |
264 + day - 1 | |
256 | 265 |
257 /* | 266 /* |
258 * 719527 days were between March 1, 1 BC and March 1, 1970, | 267 * 719527 days were between March 1, 1 BC and March 1, 1970, |
259 * 31 and 28 days were in January and February 1970 | 268 * 31 and 28 days were in January and February 1970 |
260 */ | 269 */ |