Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-06-17 21:18:53 +0400
committerIgor Sysoev <igor@sysoev.ru>2004-06-17 21:18:53 +0400
commit415b1ce1b93a3b74efe8a3ee5a35ee55e0a11caa (patch)
tree077bf24b4f310a87ab8bff140c730cb679069988 /src/core/ngx_times.c
parentf924e6b694db7fd1d99473b3d7db7eb2b49c9e62 (diff)
nginx-0.0.7-2004-06-17-21:18:53 import
Diffstat (limited to 'src/core/ngx_times.c')
-rw-r--r--src/core/ngx_times.c11
1 files changed, 8 insertions, 3 deletions
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