forked from len0rd/rockbox
Corrected get_time(). This should fix the bad file date bug. Also changed status.c to use get_time() instead of reading directly from RTC.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3170 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8ed1a3a409
commit
cc11e885d1
4 changed files with 7 additions and 10 deletions
|
@ -39,7 +39,7 @@ struct tm *get_time(void)
|
|||
tm.tm_hour = ((rtcbuf[3] & 0x30) >> 4) * 10 + (rtcbuf[3] & 0x0f);
|
||||
tm.tm_mday = ((rtcbuf[5] & 0x30) >> 4) * 10 + (rtcbuf[5] & 0x0f);
|
||||
tm.tm_mon = ((rtcbuf[6] & 0x10) >> 4) * 10 + (rtcbuf[6] & 0x0f);
|
||||
tm.tm_year = ((rtcbuf[7] & 0xf0) >> 4) * 10 + (rtcbuf[7] & 0x0f) + 2000;
|
||||
tm.tm_year = ((rtcbuf[7] & 0xf0) >> 4) * 10 + (rtcbuf[7] & 0x0f) + 100;
|
||||
tm.tm_wday = rtcbuf[4] & 0x07;
|
||||
tm.tm_yday = 0; /* Not implemented for now */
|
||||
tm.tm_isdst = -1; /* Not implemented for now */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue