mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
LibC: Add localtime_r()
This commit is contained in:
parent
57e4410044
commit
29aa8373d4
1 changed files with 4 additions and 4 deletions
|
@ -118,8 +118,7 @@ struct tm* localtime(const time_t* t)
|
||||||
if (!t)
|
if (!t)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
static struct tm tm_buf;
|
static struct tm tm_buf;
|
||||||
time_to_tm(&tm_buf, *t);
|
return localtime_r(t, &tm_buf);
|
||||||
return &tm_buf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tm* gmtime(const time_t* t)
|
struct tm* gmtime(const time_t* t)
|
||||||
|
@ -180,8 +179,9 @@ struct tm* gmtime_r(const time_t*, struct tm*)
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tm* localtime_r(const time_t*, struct tm*)
|
struct tm* localtime_r(const time_t* t, struct tm* tm)
|
||||||
{
|
{
|
||||||
ASSERT_NOT_REACHED();
|
time_to_tm(tm, *t);
|
||||||
|
return tm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue