mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
as3514 RTC driver: correct calculation, fixes FS#10625
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23037 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
30ea0b6368
commit
a4d62bd329
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ int rtc_write_datetime(const struct tm *tm)
|
|||
}
|
||||
|
||||
/* Number of days in years gone by since 1-Jan-1980 */
|
||||
year_days = 365*(tm->tm_year+20) + (tm->tm_year-1)/4 + 6;
|
||||
year_days = 365*(tm->tm_year-100+20) + (tm->tm_year-100-1)/4 + 6;
|
||||
|
||||
/* Convert to seconds since 1-Jan-1980 */
|
||||
seconds = tm->tm_sec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue