Mercurial > hg > nginx
comparison src/os/win32/ngx_time.c @ 2724:9fd2f12fee0a
fix Win32 ngx_gettimezone()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 19 Apr 2009 19:08:49 +0000 |
parents | 9c2f3ed7a247 |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
2723:53be1d485af9 | 2724:9fd2f12fee0a |
---|---|
58 | 58 |
59 | 59 |
60 ngx_int_t | 60 ngx_int_t |
61 ngx_gettimezone(void) | 61 ngx_gettimezone(void) |
62 { | 62 { |
63 u_long n; | |
63 TIME_ZONE_INFORMATION tz; | 64 TIME_ZONE_INFORMATION tz; |
64 | 65 |
65 if (GetTimeZoneInformation(&tz) != TIME_ZONE_ID_INVALID) { | 66 n = GetTimeZoneInformation(&tz); |
67 | |
68 switch (n) { | |
69 | |
70 case TIME_ZONE_ID_UNKNOWN: | |
66 return -tz.Bias; | 71 return -tz.Bias; |
72 | |
73 case TIME_ZONE_ID_STANDARD: | |
74 return -(tz.Bias + tz.StandardBias); | |
75 | |
76 case TIME_ZONE_ID_DAYLIGHT: | |
77 return -(tz.Bias + tz.DaylightBias); | |
78 | |
79 default: /* TIME_ZONE_ID_INVALID */ | |
80 return 0; | |
67 } | 81 } |
68 | |
69 return 0; | |
70 } | 82 } |