diff options
Diffstat (limited to '')
| -rw-r--r-- | src/os/win32/ngx_process_cycle.c | 2 | ||||
| -rw-r--r-- | src/os/win32/ngx_time.c | 12 | ||||
| -rw-r--r-- | src/os/win32/ngx_time.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c index ad5024b23..fa90494c5 100644 --- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c @@ -34,6 +34,8 @@ sig_atomic_t ngx_change_binary; void ngx_master_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) { + ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "master mode is not supported"); + exit(2); } diff --git a/src/os/win32/ngx_time.c b/src/os/win32/ngx_time.c index 43d2c41cb..cef335707 100644 --- a/src/os/win32/ngx_time.c +++ b/src/os/win32/ngx_time.c @@ -29,3 +29,15 @@ void ngx_gettimeofday(struct timeval *tp) tp->tv_sec = (long) (intervals / 10000000); tp->tv_usec = (long) ((intervals % 10000000) / 10); } + + +ngx_int_t ngx_timezone(void) +{ + TIME_ZONE_INFORMATION tz; + + if (GetTimeZoneInformation(&tz) != TIME_ZONE_ID_INVALID) { + return -tz.Bias; + } + + return 0; +} diff --git a/src/os/win32/ngx_time.h b/src/os/win32/ngx_time.h index 4bf377da3..9ed94baeb 100644 --- a/src/os/win32/ngx_time.h +++ b/src/os/win32/ngx_time.h @@ -34,7 +34,9 @@ typedef FILETIME ngx_mtime_t; #define ngx_msleep Sleep +#define HAVE_TIMEZONE 1 +ngx_int_t ngx_timezone(void); void ngx_gettimeofday(struct timeval *tp); |
