未验证 提交 636d1c75 编写于 作者: lymzzyh's avatar lymzzyh 提交者: GitHub

Merge pull request #1485 from suolong3000/rtc

解决get_week的有效值与IS_RTC_WEEKDAY判断有效值不一致的问题。
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册