diff src/core/ngx_times.c @ 358:0a03c921c81d

nginx-0.0.7-2004-06-17-21:18:53 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 17 Jun 2004 17:18:53 +0000
parents 8733703a37f3
children 54f76b0b8dca
line wrap: on
line diff
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -123,15 +123,20 @@ void ngx_time_update(time_t s)
     ngx_cached_http_time.data = p;
 
 
-#if (HAVE_TIMEZONE)
+#if (HAVE_GETTIMEZONE)
+
+    ngx_gmtoff = ngx_gettimezone();
+    ngx_gmtime(ngx_cached_time + ngx_gmtoff * 60, &tm);
 
-    ngx_gmtoff = ngx_timezone();
-    ngx_gmtime(ngx_cached_time + ngx_gmtoff * 60, &tm);
+#elif (HAVE_GMTOFF)
+
+    ngx_localtime(&tm);
+    ngx_gmtoff = tm.ngx_tm_gmtoff / 60;
 
 #else
 
     ngx_localtime(&tm);
-    ngx_gmtoff = tm.ngx_tm_gmtoff / 60;
+    ngx_gmtoff = ngx_timezone(tm.ngx_tm_isdst);
 
 #endif