summaryrefslogtreecommitdiff
path: root/firmware/include/timefuncs.h
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2021-07-07 17:26:24 +0000
committerJames Buren <braewoods+rb@braewoods.net>2021-07-07 17:31:00 +0000
commit49ca4b3e5e8876bf34d86eb0970385848d4a167e (patch)
tree42e6b4771f16b88b2446654a54ea13649cfb6cc4 /firmware/include/timefuncs.h
parentbce6771730d88f52fbb2e756bda457b0ce35d36b (diff)
downloadrockbox-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.h1
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
30time_t dostime_mktime(uint16_t dosdate, uint16_t dostime); 30time_t dostime_mktime(uint16_t dosdate, uint16_t dostime);
31void dostime_localtime(time_t time, uint16_t* dosdate, uint16_t* dostime);
31struct tm *get_time(void); 32struct tm *get_time(void);
32int set_time(const struct tm *tm); 33int set_time(const struct tm *tm);
33#if CONFIG_RTC 34#if CONFIG_RTC