summaryrefslogtreecommitdiffstats
path: root/firmware/libc
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-01-25 19:32:15 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-01-26 23:07:49 -0500
commit58b849c451ac1281c14bfc535ab7f411a0b736e0 (patch)
tree035026a62581900f72fa0d90bd694a8a92372c00 /firmware/libc
parent783c77531c35e62dd754c510c4f2beefe6df4a9d (diff)
downloadrockbox-58b849c451ac1281c14bfc535ab7f411a0b736e0.tar.gz
rockbox-58b849c451ac1281c14bfc535ab7f411a0b736e0.tar.bz2
rockbox-58b849c451ac1281c14bfc535ab7f411a0b736e0.zip
Move intrinsic RTC implmentation differences to driver files
Some drivers set tm_wday just fine and do not need it coerced to be correct. Others set tm_yday, so don't overwrite what the driver sets; just zero it inside if it can't fill the field. Move calls to set_day_of_week() to the sorts of drivers that presumably required the hammer (FS#11814) in get_time() where the weekday isn't locked to the date. Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
Diffstat (limited to 'firmware/libc')
-rw-r--r--firmware/libc/gmtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/libc/gmtime.c b/firmware/libc/gmtime.c
index e7ebdf0d90..c5deb593cd 100644
--- a/firmware/libc/gmtime.c
+++ b/firmware/libc/gmtime.c
@@ -108,6 +108,9 @@ struct tm *gmtime_r(const time_t *timep, struct tm *tm)
/* Second */
tm->tm_sec = seconds;
+ tm->tm_yday = 0; /* Not implemented for now */
+ tm->tm_isdst = -1; /* Not implemented for now */
+
return tm;
}