diff options
Diffstat (limited to 'src/os/unix/ngx_time.h')
-rw-r--r-- | src/os/unix/ngx_time.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/os/unix/ngx_time.h b/src/os/unix/ngx_time.h index bb03e994b..0b44c5ad4 100644 --- a/src/os/unix/ngx_time.h +++ b/src/os/unix/ngx_time.h @@ -35,6 +35,18 @@ typedef struct tm ngx_tm_t; #define ngx_tm_wday_t int +#if (SOLARIS) +#define HAVE_TIMEZONE 1 + +#define ngx_timezone() (-((daylight) ? altzone : timezone) / 60) + +#elif defined __linux__ +#define HAVE_TIMEZONE 1 + +#define ngx_timezone() (- timezone / 60 + daylight * 60) + +#endif + void ngx_localtime(ngx_tm_t *tm); |