Mercurial > hg > nginx-vendor-0-7
annotate src/os/unix/ngx_time.c @ 72:b31656313b59 NGINX_0_1_36
nginx 0.1.36
*) Change: if the request header has duplicate the "Host",
"Connection", "Content-Length", or "Authorization" lines, then nginx
now returns the 400 error.
*) Change: the "post_accept_timeout" directive was canceled.
*) Feature: the "default", "af=", "bl=", "deferred", and "bind"
parameters of the "listen" directive.
*) Feature: the FreeBSD accept filters support.
*) Feature: the Linux TCP_DEFER_ACCEPT support.
*) Bugfix: the ngx_http_autoindex_module did not support the file names
in UTF-8.
*) Bugfix: the new log file can be rotated by the -USR1 signal only if
the reconfiguration by the -HUP signal was made twice.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 15 Jun 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 } |