Merge pull request #1485 from suolong3000/rtc
解决get_week的有效值与IS_RTC_WEEKDAY判断有效值不一致的问题。
This commit is contained in:
commit
636d1c75b3
|
@ -23,7 +23,7 @@ static int get_week(int year, int month, int day)
|
|||
year -=1;
|
||||
month +=12;
|
||||
}
|
||||
return (day+1+2*month+3*(month+1)/5+year+(year/4)-year/100+year/400)%7;
|
||||
return (day+1+2*month+3*(month+1)/5+year+(year/4)-year/100+year/400)%7+1;
|
||||
}
|
||||
|
||||
static struct rt_device rtc;
|
||||
|
|
Loading…
Reference in New Issue