mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add timezone support.
This commit is contained in:
parent
eb00186be1
commit
1940d9560e
2 changed files with 9 additions and 5 deletions
|
@ -130,12 +130,8 @@ strtold.o \
|
|||
strxfrm.o \
|
||||
time/asctime.o \
|
||||
time/asctime_r.o \
|
||||
time/ctime.o \
|
||||
time/ctime_r.o \
|
||||
time/gmtime.o \
|
||||
time/gmtime_r.o \
|
||||
time/localtime.o \
|
||||
time/localtime_r.o \
|
||||
time/mktime.o \
|
||||
timespec.o \
|
||||
time/strftime.o \
|
||||
|
@ -359,7 +355,11 @@ time/clock_nanosleep.o \
|
|||
time/clock.o \
|
||||
time/clock_settime.o \
|
||||
time/clock_settimeres.o \
|
||||
time/ctime.o \
|
||||
time/ctime_r.o \
|
||||
time/difftime.o \
|
||||
time/localtime.o \
|
||||
time/localtime_r.o \
|
||||
time/nanosleep.o \
|
||||
time/timens.o \
|
||||
time/time.o \
|
||||
|
|
|
@ -26,5 +26,9 @@
|
|||
|
||||
extern "C" struct tm* localtime_r(const time_t* time_ptr, struct tm* ret)
|
||||
{
|
||||
return gmtime_r(time_ptr, ret);
|
||||
struct tm utc_tm;
|
||||
if ( !gmtime_r(time_ptr, &utc_tm) )
|
||||
return NULL;
|
||||
*ret = utc_tm;
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue