summaryrefslogtreecommitdiff
path: root/src/libstddjb/localtm_from_sysclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/localtm_from_sysclock.c')
-rw-r--r--src/libstddjb/localtm_from_sysclock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstddjb/localtm_from_sysclock.c b/src/libstddjb/localtm_from_sysclock.c
new file mode 100644
index 0000000..939bb21
--- /dev/null
+++ b/src/libstddjb/localtm_from_sysclock.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <sys/types.h>
+#include <time.h>
+#include <skalibs/uint64.h>
+#include <skalibs/djbtime.h>
+
+int localtm_from_sysclock (struct tm *l, uint64 u, int tz)
+{
+ if (!ltm64_from_sysclock(&u)) return 0 ;
+ return localtm_from_ltm64(l, u, tz) ;
+}