2003-11-11 05:09:22 +08:00
|
|
|
|
2004-09-28 16:34:51 +08:00
|
|
|
/*
|
2004-09-30 00:00:49 +08:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 16:34:51 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2003-11-11 05:09:22 +08:00
|
|
|
#include <ngx_config.h>
|
|
|
|
#include <ngx_core.h>
|
|
|
|
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_epoch_msec_t ngx_elapsed_msec;
|
|
|
|
ngx_epoch_msec_t ngx_old_elapsed_msec;
|
|
|
|
ngx_epoch_msec_t ngx_start_msec;
|
|
|
|
|
nginx-0.1.29-RELEASE import
*) Feature: the ngx_http_ssi_module supports "include virtual" command.
*) Feature: the ngx_http_ssi_module supports the condition command like
'if expr="$NAME"' and "else" and "endif" commands. Only one nested
level is supported.
*) Feature: the ngx_http_ssi_module supports the DATE_LOCAL and
DATE_GMT variables and "config timefmt" command.
*) Feature: the "ssi_ignore_recycled_buffers" directive.
*) Bugfix: the "echo" command did not show the default value for the
empty QUERY_STRING variable.
*) Change: the ngx_http_proxy_module was rewritten.
*) Feature: the "proxy_redirect", "proxy_pass_request_headers",
"proxy_pass_request_body", and "proxy_method" directives.
*) Feature: the "proxy_set_header" directive. The "proxy_x_var" was
canceled and must be replaced with the proxy_set_header directive.
*) Change: the "proxy_preserve_host" is canceled and must be replaced
with the "proxy_set_header Host $host" and the "proxy_redirect off"
directives, the "proxy_set_header Host $host:$proxy_port" directive
and the appropriate proxy_redirect directives.
*) Change: the "proxy_set_x_real_ip" is canceled and must be replaced
with the "proxy_set_header X-Real-IP $remote_addr" directive.
*) Change: the "proxy_add_x_forwarded_for" is canceled and must be
replaced with
the "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for"
directive.
*) Change: the "proxy_set_x_url" is canceled and must be replaced with
the "proxy_set_header X-URL http://$host:$server_port$request_uri"
directive.
*) Feature: the "fastcgi_param" directive.
*) Change: the "fastcgi_root", "fastcgi_set_var" and "fastcgi_params"
directive are canceled and must be replaced with the fastcgi_param
directives.
*) Feature: the "index" directive can use the variables.
*) Feature: the "index" directive can be used at http and server levels.
*) Change: the last index only in the "index" directive can be absolute.
*) Feature: the "rewrite" directive can use the variables.
*) Feature: the "internal" directive.
*) Feature: the CONTENT_LENGTH, CONTENT_TYPE, REMOTE_PORT, SERVER_ADDR,
SERVER_PORT, SERVER_PROTOCOL, DOCUMENT_ROOT, SERVER_NAME,
REQUEST_METHOD, REQUEST_URI, and REMOTE_USER variables.
*) Change: nginx now passes the invalid lines in a client request
headers or a backend response header.
*) Bugfix: if the backend did not transfer response for a long time and
the "send_timeout" was less than "proxy_read_timeout", then nginx
returned the 408 response.
*) Bugfix: the segmentation fault was occurred if the backend sent an
invalid line in response header; the bug had appeared in 0.1.26.
*) Bugfix: the segmentation fault may occurred in FastCGI fault
tolerance configuration.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" and "Cache-Control" headers.
*) Bugfix: nginx did not take into account trailing dot in "Host"
header line.
*) Bugfix: the ngx_http_auth_module did not work under Linux.
*) Bugfix: the rewrite directive worked incorrectly, if the arguments
were in a request.
*) Bugfix: nginx could not be built on MacOS X.
2005-05-12 22:58:06 +08:00
|
|
|
ngx_int_t ngx_gmtoff;
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
static ngx_tm_t ngx_cached_gmtime;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-09-28 16:34:51 +08:00
|
|
|
* In the threaded mode only one thread updates the cached time and strings
|
2004-06-28 02:01:57 +08:00
|
|
|
* and these operations are protected by the mutex. The reading of the cached
|
|
|
|
* time and strings is not protected by the mutex. To avoid the race
|
|
|
|
* conditions for non-atomic values we use the NGX_TIME_SLOTS slots to store
|
|
|
|
* time value and strings. Thus thread may get the corrupted values only
|
|
|
|
* if it is preempted while copying and then it is not scheduled to run
|
|
|
|
* more than NGX_TIME_SLOTS seconds.
|
|
|
|
*/
|
|
|
|
|
2004-02-24 04:57:12 +08:00
|
|
|
#if (NGX_THREADS)
|
2004-06-28 02:01:57 +08:00
|
|
|
|
|
|
|
#define NGX_TIME_SLOTS 60
|
|
|
|
static ngx_uint_t slot = NGX_TIME_SLOTS;
|
|
|
|
|
|
|
|
static ngx_mutex_t *ngx_time_mutex;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define NGX_TIME_SLOTS 1
|
|
|
|
#define slot 0
|
|
|
|
|
2004-02-24 04:57:12 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-12-21 20:30:30 +08:00
|
|
|
#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
volatile time_t *ngx_cached_time;
|
|
|
|
static time_t cached_time[NGX_TIME_SLOTS];
|
2003-11-13 14:14:05 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
#else
|
2003-11-13 14:14:05 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
volatile time_t ngx_cached_time;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
#endif
|
2004-04-22 02:54:33 +08:00
|
|
|
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_thread_volatile ngx_str_t ngx_cached_err_log_time;
|
|
|
|
ngx_thread_volatile ngx_str_t ngx_cached_http_time;
|
|
|
|
ngx_thread_volatile ngx_str_t ngx_cached_http_log_time;
|
|
|
|
|
|
|
|
|
|
|
|
static u_char cached_err_log_time[NGX_TIME_SLOTS]
|
|
|
|
[sizeof("1970/09/28 12:00:00")];
|
|
|
|
static u_char cached_http_time[NGX_TIME_SLOTS]
|
|
|
|
[sizeof("Mon, 28 Sep 1970 06:00:00 GMT")];
|
|
|
|
static u_char cached_http_log_time[NGX_TIME_SLOTS]
|
|
|
|
[sizeof("28/Sep/1970:12:00:00 +0600")];
|
2003-11-11 05:09:22 +08:00
|
|
|
|
|
|
|
|
2004-04-26 04:13:21 +08:00
|
|
|
static char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
2003-11-13 14:14:05 +08:00
|
|
|
static char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
|
|
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
void
|
|
|
|
ngx_time_init(void)
|
2003-11-11 05:09:22 +08:00
|
|
|
{
|
2003-11-13 14:14:05 +08:00
|
|
|
struct timeval tv;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2003-11-13 14:14:05 +08:00
|
|
|
ngx_memzero(&ngx_cached_gmtime, sizeof(ngx_tm_t));
|
|
|
|
#ifdef ngx_tm_zone
|
|
|
|
ngx_cached_gmtime.ngx_tm_zone = "GMT";
|
|
|
|
#endif
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_cached_err_log_time.len = sizeof("1970/09/28 12:00:00") - 1;
|
|
|
|
ngx_cached_http_time.len = sizeof("Mon, 28 Sep 1970 06:00:00 GMT") - 1;
|
|
|
|
ngx_cached_http_log_time.len = sizeof("28/Sep/1970:12:00:00 +0600") - 1;
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-12-21 20:30:30 +08:00
|
|
|
#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_cached_time = &cached_time[0];
|
|
|
|
#endif
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2003-11-13 14:14:05 +08:00
|
|
|
ngx_gettimeofday(&tv);
|
2004-01-30 05:45:01 +08:00
|
|
|
|
2004-07-13 04:43:53 +08:00
|
|
|
ngx_start_msec = (ngx_epoch_msec_t) tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
2003-12-06 01:07:27 +08:00
|
|
|
ngx_old_elapsed_msec = 0;
|
2003-12-04 22:53:00 +08:00
|
|
|
ngx_elapsed_msec = 0;
|
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
#if !(NGX_WIN32)
|
2004-04-22 02:54:33 +08:00
|
|
|
tzset();
|
|
|
|
#endif
|
|
|
|
|
2004-01-06 04:55:48 +08:00
|
|
|
ngx_time_update(tv.tv_sec);
|
2004-02-26 04:16:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if (NGX_THREADS)
|
2004-02-24 04:57:12 +08:00
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
ngx_int_t
|
|
|
|
ngx_time_mutex_init(ngx_log_t *log)
|
2004-02-26 04:16:15 +08:00
|
|
|
{
|
2005-03-19 20:38:37 +08:00
|
|
|
ngx_time_mutex = ngx_mutex_init(log, NGX_MUTEX_LIGHT);
|
|
|
|
|
|
|
|
if (ngx_time_mutex == NULL) {
|
2004-02-26 04:16:15 +08:00
|
|
|
return NGX_ERROR;
|
2004-02-24 04:57:12 +08:00
|
|
|
}
|
|
|
|
|
2004-02-26 04:16:15 +08:00
|
|
|
return NGX_OK;
|
2003-11-13 14:14:05 +08:00
|
|
|
}
|
2003-11-13 01:25:12 +08:00
|
|
|
|
2004-02-26 04:16:15 +08:00
|
|
|
#endif
|
|
|
|
|
2003-11-13 01:25:12 +08:00
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
void
|
|
|
|
ngx_time_update(time_t s)
|
2003-11-13 14:14:05 +08:00
|
|
|
{
|
2004-04-22 04:13:48 +08:00
|
|
|
u_char *p;
|
|
|
|
ngx_tm_t tm;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
if (ngx_time() == s) {
|
2004-01-06 04:55:48 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2004-02-26 04:16:15 +08:00
|
|
|
#if (NGX_THREADS)
|
2004-06-28 02:01:57 +08:00
|
|
|
|
2004-02-27 01:10:01 +08:00
|
|
|
if (ngx_mutex_trylock(ngx_time_mutex) != NGX_OK) {
|
|
|
|
return;
|
2004-02-24 04:57:12 +08:00
|
|
|
}
|
2004-06-28 02:01:57 +08:00
|
|
|
|
|
|
|
if (slot == NGX_TIME_SLOTS) {
|
|
|
|
slot = 0;
|
|
|
|
} else {
|
|
|
|
slot++;
|
|
|
|
}
|
|
|
|
|
2004-12-21 20:30:30 +08:00
|
|
|
#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_cached_time = &cached_time[slot];
|
2004-02-24 04:57:12 +08:00
|
|
|
#endif
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
#endif
|
2004-01-06 04:55:48 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_time() = s;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_gmtime(s, &ngx_cached_gmtime);
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
|
|
|
|
p = cached_http_time[slot];
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
ngx_sprintf(p, "%s, %02d %s %4d %02d:%02d:%02d GMT",
|
|
|
|
week[ngx_cached_gmtime.ngx_tm_wday],
|
|
|
|
ngx_cached_gmtime.ngx_tm_mday,
|
|
|
|
months[ngx_cached_gmtime.ngx_tm_mon - 1],
|
|
|
|
ngx_cached_gmtime.ngx_tm_year,
|
|
|
|
ngx_cached_gmtime.ngx_tm_hour,
|
|
|
|
ngx_cached_gmtime.ngx_tm_min,
|
|
|
|
ngx_cached_gmtime.ngx_tm_sec);
|
2004-04-22 02:54:33 +08:00
|
|
|
|
|
|
|
ngx_cached_http_time.data = p;
|
|
|
|
|
|
|
|
|
2004-11-26 00:17:31 +08:00
|
|
|
#if (NGX_HAVE_GETTIMEZONE)
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-06-18 01:18:53 +08:00
|
|
|
ngx_gmtoff = ngx_gettimezone();
|
2004-06-28 02:01:57 +08:00
|
|
|
ngx_gmtime(s + ngx_gmtoff * 60, &tm);
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-11-26 00:17:31 +08:00
|
|
|
#elif (NGX_HAVE_GMTOFF)
|
2003-11-11 05:09:22 +08:00
|
|
|
|
|
|
|
ngx_localtime(&tm);
|
2004-04-22 02:54:33 +08:00
|
|
|
ngx_gmtoff = tm.ngx_tm_gmtoff / 60;
|
|
|
|
|
2004-06-18 01:18:53 +08:00
|
|
|
#else
|
|
|
|
|
|
|
|
ngx_localtime(&tm);
|
|
|
|
ngx_gmtoff = ngx_timezone(tm.ngx_tm_isdst);
|
|
|
|
|
2004-04-22 02:54:33 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
p = cached_err_log_time[slot];
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
ngx_sprintf(p, "%4d/%02d/%02d %02d:%02d:%02d",
|
|
|
|
tm.ngx_tm_year, tm.ngx_tm_mon,
|
|
|
|
tm.ngx_tm_mday, tm.ngx_tm_hour,
|
|
|
|
tm.ngx_tm_min, tm.ngx_tm_sec);
|
2004-04-22 02:54:33 +08:00
|
|
|
|
|
|
|
ngx_cached_err_log_time.data = p;
|
|
|
|
|
|
|
|
|
2004-06-28 02:01:57 +08:00
|
|
|
p = cached_http_log_time[slot];
|
2004-04-22 02:54:33 +08:00
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
ngx_sprintf(p, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d",
|
|
|
|
tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],
|
|
|
|
tm.ngx_tm_year, tm.ngx_tm_hour,
|
|
|
|
tm.ngx_tm_min, tm.ngx_tm_sec,
|
|
|
|
ngx_gmtoff < 0 ? '-' : '+',
|
|
|
|
abs(ngx_gmtoff / 60), abs(ngx_gmtoff % 60));
|
2004-04-22 02:54:33 +08:00
|
|
|
|
|
|
|
ngx_cached_http_log_time.data = p;
|
2003-11-11 05:09:22 +08:00
|
|
|
|
2004-02-24 04:57:12 +08:00
|
|
|
|
2004-02-26 04:16:15 +08:00
|
|
|
#if (NGX_THREADS)
|
2004-02-27 01:10:01 +08:00
|
|
|
ngx_mutex_unlock(ngx_time_mutex);
|
2004-02-24 04:57:12 +08:00
|
|
|
#endif
|
|
|
|
|
2003-11-11 05:09:22 +08:00
|
|
|
}
|
2003-11-13 14:14:05 +08:00
|
|
|
|
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
u_char *
|
|
|
|
ngx_http_time(u_char *buf, time_t t)
|
2003-11-13 14:14:05 +08:00
|
|
|
{
|
|
|
|
ngx_tm_t tm;
|
|
|
|
|
|
|
|
ngx_gmtime(t, &tm);
|
|
|
|
|
2004-10-21 23:34:38 +08:00
|
|
|
return ngx_sprintf(buf, "%s, %02d %s %4d %02d:%02d:%02d GMT",
|
|
|
|
week[tm.ngx_tm_wday],
|
|
|
|
tm.ngx_tm_mday,
|
|
|
|
months[tm.ngx_tm_mon - 1],
|
|
|
|
tm.ngx_tm_year,
|
|
|
|
tm.ngx_tm_hour,
|
|
|
|
tm.ngx_tm_min,
|
|
|
|
tm.ngx_tm_sec);
|
2004-08-29 11:55:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
u_char *
|
|
|
|
ngx_http_cookie_time(u_char *buf, time_t t)
|
2004-08-29 11:55:41 +08:00
|
|
|
{
|
|
|
|
ngx_tm_t tm;
|
|
|
|
|
|
|
|
ngx_gmtime(t, &tm);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Netscape 3.x does not understand 4-digit years at all and
|
|
|
|
* 2-digit years more than "37"
|
|
|
|
*/
|
|
|
|
|
2004-10-21 23:34:38 +08:00
|
|
|
return ngx_sprintf(buf,
|
|
|
|
(tm.ngx_tm_year > 2037) ?
|
|
|
|
"%s, %02d-%s-%d %02d:%02d:%02d GMT":
|
|
|
|
"%s, %02d-%s-%02d %02d:%02d:%02d GMT",
|
|
|
|
week[tm.ngx_tm_wday],
|
|
|
|
tm.ngx_tm_mday,
|
|
|
|
months[tm.ngx_tm_mon - 1],
|
|
|
|
(tm.ngx_tm_year > 2037) ? tm.ngx_tm_year:
|
|
|
|
tm.ngx_tm_year % 100,
|
|
|
|
tm.ngx_tm_hour,
|
|
|
|
tm.ngx_tm_min,
|
|
|
|
tm.ngx_tm_sec);
|
2003-11-13 14:14:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-03-19 20:38:37 +08:00
|
|
|
void
|
|
|
|
ngx_gmtime(time_t t, ngx_tm_t *tp)
|
2003-11-13 14:14:05 +08:00
|
|
|
{
|
2004-03-16 15:10:12 +08:00
|
|
|
ngx_int_t sec, min, hour, mday, mon, year, wday, yday, days;
|
2003-11-13 14:14:05 +08:00
|
|
|
|
|
|
|
days = t / 86400;
|
|
|
|
|
|
|
|
/* Jaunary 1, 1970 was Thursday */
|
|
|
|
wday = (4 + days) % 7;
|
|
|
|
|
|
|
|
t %= 86400;
|
|
|
|
hour = t / 3600;
|
|
|
|
t %= 3600;
|
2003-12-09 04:48:12 +08:00
|
|
|
min = t / 60;
|
2003-11-13 14:14:05 +08:00
|
|
|
sec = t % 60;
|
|
|
|
|
|
|
|
/* the algorithm based on Gauss's formula */
|
2003-12-09 04:48:12 +08:00
|
|
|
|
2003-11-13 14:14:05 +08:00
|
|
|
days = days - (31 + 28) + 719527;
|
|
|
|
|
|
|
|
year = days * 400 / (365 * 400 + 100 - 4 + 1);
|
|
|
|
yday = days - (365 * year + year / 4 - year / 100 + year / 400);
|
|
|
|
|
|
|
|
mon = (yday + 31) * 12 / 367;
|
|
|
|
mday = yday - (mon * 367 / 12 - 31);
|
|
|
|
|
|
|
|
mon += 2;
|
|
|
|
|
|
|
|
if (yday >= 306) {
|
2004-09-28 16:34:51 +08:00
|
|
|
|
2004-03-30 01:43:58 +08:00
|
|
|
/*
|
2004-04-22 04:13:48 +08:00
|
|
|
* there is no "yday" in Win32 SYSTEMTIME
|
2004-03-30 01:43:58 +08:00
|
|
|
*
|
|
|
|
* yday -= 306;
|
|
|
|
*/
|
|
|
|
|
2003-11-13 14:14:05 +08:00
|
|
|
year++;
|
|
|
|
mon -= 12;
|
|
|
|
|
|
|
|
if (mday == 0) {
|
|
|
|
/* Jaunary 31 */
|
|
|
|
mon = 1;
|
|
|
|
mday = 31;
|
|
|
|
|
|
|
|
} else if (mon == 2) {
|
|
|
|
|
|
|
|
if ((year % 4 == 0) && (year % 100 || (year % 400 == 0))) {
|
|
|
|
if (mday > 29) {
|
|
|
|
mon = 3;
|
|
|
|
mday -= 29;
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (mday > 28) {
|
|
|
|
mon = 3;
|
|
|
|
mday -= 28;
|
|
|
|
}
|
|
|
|
}
|
2004-03-30 01:43:58 +08:00
|
|
|
/*
|
2004-04-22 04:13:48 +08:00
|
|
|
* there is no "yday" in Win32 SYSTEMTIME
|
2004-03-30 01:43:58 +08:00
|
|
|
*
|
|
|
|
* } else {
|
|
|
|
* yday += 31 + 28;
|
|
|
|
*
|
|
|
|
* if ((year % 4 == 0) && (year % 100 || (year % 400 == 0))) {
|
2005-02-16 21:40:36 +08:00
|
|
|
* yday++;
|
2004-03-30 01:43:58 +08:00
|
|
|
* }
|
|
|
|
*/
|
2003-11-13 14:14:05 +08:00
|
|
|
}
|
|
|
|
|
2004-03-16 15:10:12 +08:00
|
|
|
tp->ngx_tm_sec = (ngx_tm_sec_t) sec;
|
|
|
|
tp->ngx_tm_min = (ngx_tm_min_t) min;
|
|
|
|
tp->ngx_tm_hour = (ngx_tm_hour_t) hour;
|
|
|
|
tp->ngx_tm_mday = (ngx_tm_mday_t) mday;
|
|
|
|
tp->ngx_tm_mon = (ngx_tm_mon_t) mon;
|
|
|
|
tp->ngx_tm_year = (ngx_tm_year_t) year;
|
|
|
|
tp->ngx_tm_wday = (ngx_tm_wday_t) wday;
|
2003-11-13 14:14:05 +08:00
|
|
|
}
|