Merge pull request #1485 from suolong3000/rtc

解决get_week的有效值与IS_RTC_WEEKDAY判断有效值不一致的问题。
This commit is contained in:
ZYH 2018-06-13 21:57:50 +08:00 committed by GitHub
commit 636d1c75b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;