apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1372022 - /apr/apr/trunk/time/win32/time.c
Date Sat, 11 Aug 2012 20:42:45 GMT
Author: trawick
Date: Sat Aug 11 20:42:45 2012
New Revision: 1372022

URL: http://svn.apache.org/viewvc?rev=1372022&view=rev
Log:
apr_time_exp_*() on Windows: Fix error in the tm_yday field of
apr_time_exp_t for times within leap years.

PR: 53175

Modified:
    apr/apr/trunk/time/win32/time.c

Modified: apr/apr/trunk/time/win32/time.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/time/win32/time.c?rev=1372022&r1=1372021&r2=1372022&view=diff
==============================================================================
--- apr/apr/trunk/time/win32/time.c (original)
+++ apr/apr/trunk/time/win32/time.c Sat Aug 11 20:42:45 2012
@@ -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)
 {



Mime
View raw message