1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
James Buren 2021-07-07 17:26:24 +00:00
parent bce6771730
commit 49ca4b3e5e
2 changed files with 18 additions and 0 deletions

View file

@ -28,6 +28,7 @@
#include "time.h"
time_t dostime_mktime(uint16_t dosdate, uint16_t dostime);
void dostime_localtime(time_t time, uint16_t* dosdate, uint16_t* dostime);
struct tm *get_time(void);
int set_time(const struct tm *tm);
#if CONFIG_RTC