summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-11 21:05:39 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-11 21:05:39 +0000
commit93cb2b22a7a696f6d973b1be75f3056e2493781f (patch)
tree6f3ccf0f42b98c0efe59420c3c03261da5083e11
parent962137ff2fe12c4942f793698e91962ad93c1b94 (diff)
downloadlibapr-93cb2b22a7a696f6d973b1be75f3056e2493781f.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/1.4.x@1372028 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES4
-rw-r--r--time/win32/time.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 16f7a5f7e..0ecfb5553 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes for APR 1.4.7
+ *) 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 ecf022854..234979935 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)
{