mirror of
git://git.musl-libc.org/musl
synced 2024-12-16 19:55:38 +00:00
add timegm function (inverse of gmtime), nonstandard
This commit is contained in:
parent
2169265ec6
commit
23be72ae45
@ -114,6 +114,9 @@ struct tm *getdate (const char *);
|
||||
int stime(time_t *);
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE)
|
||||
time_t timegm(struct tm *);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
9
src/time/timegm.c
Normal file
9
src/time/timegm.c
Normal file
@ -0,0 +1,9 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <time.h>
|
||||
|
||||
#include "__time.h"
|
||||
|
||||
time_t timegm(struct tm *tm)
|
||||
{
|
||||
return __tm_to_time(tm);
|
||||
}
|
Loading…
Reference in New Issue
Block a user