Mercurial > hg > nginx-mail
annotate src/os/unix/ngx_time.c @ 76:da9a3b14312d NGINX_0_1_38
nginx 0.1.38
*) Feature: the "limit_rate" directive is supported in in proxy and
FastCGI mode.
*) Feature: the "X-Accel-Limit-Rate" response header line is supported
in proxy and FastCGI mode.
*) Feature: the "break" directive.
*) Feature: the "log_not_found" directive.
*) Bugfix: the response status code was not changed when request was
redirected by the ""X-Accel-Redirect" header line.
*) Bugfix: the variables set by the "set" directive could not be used
in SSI.
*) Bugfix: the segmentation fault may occurred if the SSI page has more
than one remote subrequest.
*) Bugfix: nginx treated the backend response as invalid if the status
line in the header was transferred in two packets; bug appeared in
0.1.29.
*) Feature: the "ssi_types" directive.
*) Feature: the "autoindex_exact_size" directive.
*) Bugfix: the ngx_http_autoindex_module did not support the long file
names in UTF-8.
*) Feature: the IMAP/POP3 proxy.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 08 Jul 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 } |