summaryrefslogtreecommitdiffstats
path: root/src/lib/utc-mktime.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/utc-mktime.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/utc-mktime.h b/src/lib/utc-mktime.h
new file mode 100644
index 0000000..9f32f6e
--- /dev/null
+++ b/src/lib/utc-mktime.h
@@ -0,0 +1,11 @@
+#ifndef UTC_MKTIME_H
+#define UTC_MKTIME_H
+
+#include <time.h>
+
+/* Like mktime(), but assume that tm is in UTC. Unlike mktime(), values in
+ tm fields must be in valid range. Leap second is accepted any time though
+ since utc_mktime is often used before applying the time zone offset. */
+time_t utc_mktime(const struct tm *tm);
+
+#endif