diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2012-08-12 13:22:19 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2012-08-12 13:22:19 +0000 |
commit | c795cb0628b0fcf12c48668377409590d4227afd (patch) | |
tree | 2e1e0eb360c27dc6495cf7bf0f44b96ae7460865 | |
parent | e47249a1f65e5be616038d220d862b8064efe82a (diff) | |
download | libapr-c795cb0628b0fcf12c48668377409590d4227afd.tar.gz |
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
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | time/win32/time.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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) { |