Add timezone support.
This commit is contained in:
parent
eb00186be1
commit
1940d9560e
|
@ -130,12 +130,8 @@ strtold.o \
|
||||||
strxfrm.o \
|
strxfrm.o \
|
||||||
time/asctime.o \
|
time/asctime.o \
|
||||||
time/asctime_r.o \
|
time/asctime_r.o \
|
||||||
time/ctime.o \
|
|
||||||
time/ctime_r.o \
|
|
||||||
time/gmtime.o \
|
time/gmtime.o \
|
||||||
time/gmtime_r.o \
|
time/gmtime_r.o \
|
||||||
time/localtime.o \
|
|
||||||
time/localtime_r.o \
|
|
||||||
time/mktime.o \
|
time/mktime.o \
|
||||||
timespec.o \
|
timespec.o \
|
||||||
time/strftime.o \
|
time/strftime.o \
|
||||||
|
@ -359,7 +355,11 @@ time/clock_nanosleep.o \
|
||||||
time/clock.o \
|
time/clock.o \
|
||||||
time/clock_settime.o \
|
time/clock_settime.o \
|
||||||
time/clock_settimeres.o \
|
time/clock_settimeres.o \
|
||||||
|
time/ctime.o \
|
||||||
|
time/ctime_r.o \
|
||||||
time/difftime.o \
|
time/difftime.o \
|
||||||
|
time/localtime.o \
|
||||||
|
time/localtime_r.o \
|
||||||
time/nanosleep.o \
|
time/nanosleep.o \
|
||||||
time/timens.o \
|
time/timens.o \
|
||||||
time/time.o \
|
time/time.o \
|
||||||
|
|
|
@ -26,5 +26,9 @@
|
||||||
|
|
||||||
extern "C" struct tm* localtime_r(const time_t* time_ptr, struct tm* ret)
|
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 New Issue