Mercurial > hg > nginx-ranges
annotate src/os/unix/ngx_time.c @ 104:146eff53ab60 NGINX_0_2_6
nginx 0.2.6
*) Change: while using load-balancing the time before the failed
backend retry was decreased from 60 to 10 seconds.
*) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI
now passed, if the URI part is omitted in "proxy_pass" directive.
*) Feature: the "error_page" directive supports redirects and allows
more flexible to change an error code.
*) Change: the charset in the "Content-Type" header line now is ignored
in proxied subrequests.
*) Bugfix: if the URI was changed in the "if" block and request did not
found new configuration, then the ngx_http_rewrite_module rules ran
again.
*) Bugfix: if the "set" directive set the ngx_http_geo_module variable
in some configuration part, the this variable was not available in
other configuration parts and the "using uninitialized variable"
error was occurred; bug appeared in 0.2.2.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 05 Oct 2005 00:00:00 +0400 |
parents | 818201e5a553 |
children | 408f195b3482 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
11 void ngx_localtime(ngx_tm_t *tm) | |
12 { | |
18 | 13 #if (NGX_HAVE_LOCALTIME_R) |
0 | 14 time_t now; |
15 | |
16 now = ngx_time(); | |
66 | 17 (void) localtime_r(&now, tm); |
0 | 18 |
19 #else | |
20 time_t now; | |
21 ngx_tm_t *t; | |
22 | |
23 now = ngx_time(); | |
24 t = localtime(&now); | |
25 *tm = *t; | |
26 | |
27 #endif | |
28 | |
29 tm->ngx_tm_mon++; | |
30 tm->ngx_tm_year += 1900; | |
31 } | |
58 | 32 |
33 | |
34 void ngx_libc_localtime(struct tm *tm) | |
35 { | |
36 #if (NGX_HAVE_LOCALTIME_R) | |
37 time_t now; | |
38 | |
39 now = ngx_time(); | |
66 | 40 (void) localtime_r(&now, tm); |
58 | 41 |
42 #else | |
43 time_t now; | |
44 struct tm *t; | |
45 | |
46 now = ngx_time(); | |
47 t = localtime(&now); | |
48 *tm = *t; | |
49 | |
50 #endif | |
51 } | |
52 | |
53 | |
54 void ngx_libc_gmtime(struct tm *tm) | |
55 { | |
56 #if (NGX_HAVE_LOCALTIME_R) | |
57 time_t now; | |
58 | |
59 now = ngx_time(); | |
66 | 60 (void) gmtime_r(&now, tm); |
58 | 61 |
62 #else | |
63 time_t now; | |
64 struct tm *t; | |
65 | |
66 now = ngx_time(); | |
67 t = gmtime(&now); | |
68 *tm = *t; | |
69 | |
70 #endif | |
71 } |