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
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-30 23:52:07 +0400
committerIgor Sysoev <igor@sysoev.ru>2008-08-30 23:52:07 +0400
commitfcb5a705dd24e1e0143802a92a70df7096f8d039 (patch)
tree195bcbb7f73d104e995b6750a249ffd64e859bf0 /src/core
parentd76eb9a8c8f9353a1fa7d311797ecaaf78748945 (diff)
ngx_timezone_update()
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_cycle.c11
-rw-r--r--src/core/ngx_times.c4
2 files changed, 11 insertions, 4 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 725f54b49..39d1e4c81 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -47,6 +47,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
u_char *lock_file;
ngx_uint_t i, n;
ngx_log_t *log;
+ ngx_time_t *tp;
ngx_conf_t conf;
ngx_pool_t *pool;
ngx_cycle_t *cycle, **old;
@@ -59,6 +60,16 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
ngx_core_module_t *module;
char hostname[NGX_MAXHOSTNAMELEN];
+ ngx_timezone_update();
+
+ /* force localtime update with a new timezone */
+
+ tp = ngx_timeofday();
+ tp->sec = 0;
+
+ ngx_time_update(0, 0);
+
+
log = old_cycle->log;
pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, log);
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index 99b25813b..3105beb47 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -50,10 +50,6 @@ ngx_time_init(void)
ngx_cached_time = &cached_time[0];
-#if !(NGX_WIN32)
- tzset();
-#endif
-
ngx_time_update(0, 0);
}