diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-03-29 17:43:58 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-03-29 17:43:58 +0000 |
commit | 11dbe97ca401221313dc233aa2d6f67dfcaef1a7 (patch) | |
tree | fcd53429592c68f6fdf8d3ad4b0c151b9ebd5ff3 /src/core/ngx_times.c | |
parent | 14f02ed0dde2ee19da75cd836daf76505d7f2e9c (diff) | |
download | nginx-11dbe97ca401221313dc233aa2d6f67dfcaef1a7.tar.gz nginx-11dbe97ca401221313dc233aa2d6f67dfcaef1a7.zip |
nginx-0.0.3-2004-03-29-21:43:58 import
Diffstat (limited to 'src/core/ngx_times.c')
-rw-r--r-- | src/core/ngx_times.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c index b23fac61e..4a6ad2ef3 100644 --- a/src/core/ngx_times.c +++ b/src/core/ngx_times.c @@ -171,7 +171,12 @@ void ngx_gmtime(time_t t, ngx_tm_t *tp) mon += 2; if (yday >= 306) { - yday -= 306; + /* + * yday is not used in Win32 SYSTEMTIME + * + * yday -= 306; + */ + year++; mon -= 12; @@ -194,12 +199,16 @@ void ngx_gmtime(time_t t, ngx_tm_t *tp) } } - } else { - yday += 31 + 28; - - if ((year % 4 == 0) && (year % 100 || (year % 400 == 0))) { - yday++; - } +/* + * yday is not used in Win32 SYSTEMTIME + * + * } else { + * yday += 31 + 28; + * + * if ((year % 4 == 0) && (year % 100 || (year % 400 == 0))) { + * yday++; + * } + */ } tp->ngx_tm_sec = (ngx_tm_sec_t) sec; |