summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-06-13 14:41:52 -0400
committerRich Felker <dalias@aerifal.cx>2012-06-13 14:41:52 -0400
commit23be72ae4534c13a7fd03f580934cc251ada619f (patch)
tree97ceb660ce5d0e0dbc834cbaa48dc48f157bf127 /src
parent2169265ec6c902cd460bf96a1a0b5103657a4954 (diff)
downloadmusl-23be72ae4534c13a7fd03f580934cc251ada619f.tar.gz
add timegm function (inverse of gmtime), nonstandard
Diffstat (limited to 'src')
-rw-r--r--src/time/timegm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/time/timegm.c b/src/time/timegm.c
new file mode 100644
index 00000000..6d08917e
--- /dev/null
+++ b/src/time/timegm.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <time.h>
+
+#include "__time.h"
+
+time_t timegm(struct tm *tm)
+{
+ return __tm_to_time(tm);
+}