diff options
author | James Buren <braewoods+rb@braewoods.net> | 2021-07-07 17:26:24 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2021-07-07 17:31:00 +0000 |
commit | 49ca4b3e5e8876bf34d86eb0970385848d4a167e (patch) | |
tree | 42e6b4771f16b88b2446654a54ea13649cfb6cc4 /firmware/include/timefuncs.h | |
parent | bce6771730d88f52fbb2e756bda457b0ce35d36b (diff) | |
download | rockbox-49ca4b3e5e8876bf34d86eb0970385848d4a167e.tar.gz rockbox-49ca4b3e5e8876bf34d86eb0970385848d4a167e.zip |
timefuncs: add dostime_localtime function
This does the opposite of dostime_mktime, converting time_t back to
the two dos date time values. We use gmtime_r for native because that
is what is available and acts the same as localtime_r on other platforms
with a regular libc available.
Change-Id: If79469d0aae2d7c5dcdd905fbf04963669aa1138
Diffstat (limited to 'firmware/include/timefuncs.h')
-rw-r--r-- | firmware/include/timefuncs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/include/timefuncs.h b/firmware/include/timefuncs.h index 2e8ef01ca6..25e041b576 100644 --- a/firmware/include/timefuncs.h +++ b/firmware/include/timefuncs.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "time.h" | 28 | #include "time.h" |
29 | 29 | ||
30 | time_t dostime_mktime(uint16_t dosdate, uint16_t dostime); | 30 | time_t dostime_mktime(uint16_t dosdate, uint16_t dostime); |
31 | void dostime_localtime(time_t time, uint16_t* dosdate, uint16_t* dostime); | ||
31 | struct tm *get_time(void); | 32 | struct tm *get_time(void); |
32 | int set_time(const struct tm *tm); | 33 | int set_time(const struct tm *tm); |
33 | #if CONFIG_RTC | 34 | #if CONFIG_RTC |