summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2007-02-04 20:43:25 +0000
committerBarry Wardell <rockbox@barrywardell.net>2007-02-04 20:43:25 +0000
commit7174e88b1968d667d7436b70b18706f051ce1f62 (patch)
tree6b1905de20b77a6219455480c27162b194483da5 /firmware/drivers
parent88b3f39d731444f6511bd8962b6e4328724f01b3 (diff)
Fix setting time on Sansa used to set the day to one day later than it
should. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12196 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 8b234fcafe..87861b62cf 100644
--- a/firmware/drivers/rtc/rtc_as3514.c
+++ b/firmware/drivers/rtc/rtc_as3514.c
@@ -152,7 +152,7 @@ int rtc_write_datetime(unsigned char* buf)
seconds = buf[0]
+ buf[1]*MINUTE_SECONDS
+ buf[2]*HOUR_SECONDS
- + buf[4]*DAY_SECONDS
+ + (buf[4]-1)*DAY_SECONDS
+ month_days*DAY_SECONDS
+ year_days*DAY_SECONDS;