summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorMichael Chicoine <mc2739@gmail.com>2009-10-09 09:44:55 +0000
committerMichael Chicoine <mc2739@gmail.com>2009-10-09 09:44:55 +0000
commita4d62bd32937441ff5c63044d32d7d0ddac2aae3 (patch)
tree93ad8a6cbbf01ef7c6b07fe1f852f9f5712a2136 /firmware/drivers
parent30ea0b6368294a04a37049f2567d654b6948270e (diff)
as3514 RTC driver: correct calculation, fixes FS#10625
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23037 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/rtc/rtc_as3514.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/rtc/rtc_as3514.c b/firmware/drivers/rtc/rtc_as3514.c
index 159a0456a3..43368d2dd1 100644
--- a/firmware/drivers/rtc/rtc_as3514.c
+++ b/firmware/drivers/rtc/rtc_as3514.c
@@ -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