Allow year 2000 to have 366 days as it did

This commit is contained in:
Pierre Pronchery 2018-08-14 19:05:16 +02:00
parent 34dec8f44a
commit d5d96defdd

View File

@ -134,7 +134,7 @@ static time_t _get_time_days_per_month(uint8_t month, unsigned int year)
case 12:
return 31;
case 2:
if((year & 0x3) == 0 && year != 2000)
if((year & 0x3) == 0)
return 29;
return 28;
case 4:
@ -149,7 +149,7 @@ static time_t _get_time_days_per_month(uint8_t month, unsigned int year)
static time_t _get_time_days_per_year(unsigned int year)
{
if((year & 0x3) == 0 && year != 2000)
if((year & 0x3) == 0)
return 366;
return 365;
}