From 415b1ce1b93a3b74efe8a3ee5a35ee55e0a11caa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 17 Jun 2004 17:18:53 +0000 Subject: nginx-0.0.7-2004-06-17-21:18:53 import --- src/core/ngx_core.h | 1 + src/core/ngx_times.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h index 55c4147f7..2a112dded 100644 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -19,6 +19,7 @@ typedef struct ngx_connection_s ngx_connection_t; #include #include #include +#include #include #include #include diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c index ac2a3a9db..aa461c56f 100644 --- a/src/core/ngx_times.c +++ b/src/core/ngx_times.c @@ -123,16 +123,21 @@ void ngx_time_update(time_t s) ngx_cached_http_time.data = p; -#if (HAVE_TIMEZONE) +#if (HAVE_GETTIMEZONE) - ngx_gmtoff = ngx_timezone(); + ngx_gmtoff = ngx_gettimezone(); ngx_gmtime(ngx_cached_time + ngx_gmtoff * 60, &tm); -#else +#elif (HAVE_GMTOFF) ngx_localtime(&tm); ngx_gmtoff = tm.ngx_tm_gmtoff / 60; +#else + + ngx_localtime(&tm); + ngx_gmtoff = ngx_timezone(tm.ngx_tm_isdst); + #endif -- cgit