From c795cb0628b0fcf12c48668377409590d4227afd Mon Sep 17 00:00:00 2001 From: trawick Date: Sun, 12 Aug 2012 13:22:19 +0000 Subject: merge r1372022 from trunk: apr_time_exp_*() on Windows: Fix error in the tm_yday field of apr_time_exp_t for times within leap years. PR: 53175 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@1372090 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ time/win32/time.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index cb78377ae..11ac2fce9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with APR 0.9.21 + *) apr_time_exp_*() on Windows: Fix error in the tm_yday field of + apr_time_exp_t for times within leap years. PR 53175. + [Jeff Trawick] + *) Improve platform detection by updating config.guess and config.sub. [Rainer Jung] diff --git a/time/win32/time.c b/time/win32/time.c index 2711488fc..47158eb30 100644 --- a/time/win32/time.c +++ b/time/win32/time.c @@ -32,7 +32,7 @@ /* Leap year is any year divisible by four, but not by 100 unless also * divisible by 400 */ -#define IsLeapYear(y) ((!(y % 4)) ? (((!(y % 400)) && (y % 100)) ? 1 : 0) : 0) +#define IsLeapYear(y) ((!(y % 4)) ? (((y % 400) && !(y % 100)) ? 0 : 1) : 0) static DWORD get_local_timezone(TIME_ZONE_INFORMATION **tzresult) { -- cgit v1.2.1