summaryrefslogtreecommitdiffstats
path: root/include/timeutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/timeutils.h')
-rw-r--r--include/timeutils.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/timeutils.h b/include/timeutils.h
index a1cd1b353..2ec193a09 100644
--- a/include/timeutils.h
+++ b/include/timeutils.h
@@ -58,12 +58,16 @@ int parse_timestamp(const char *t, usec_t *usec);
enum {
ISO_8601_DATE = (1 << 1),
ISO_8601_TIME = (1 << 2),
- ISO_8601_USEC = (1 << 3),
- ISO_8601_TIMEZONE = (1 << 4),
- ISO_8601_SPACE = (1 << 5)
+ ISO_8601_DOTUSEC = (1 << 3),
+ ISO_8601_COMMAUSEC = (1 << 4),
+ ISO_8601_TIMEZONE = (1 << 5),
+ ISO_8601_SPACE = (1 << 6)
};
-char *strtimeval_iso(struct timeval *tv, int flags);
-char *strtm_iso(struct tm *tm, int flags);
-char *strtime_iso(const time_t *t, int flags);
+
+#define ISO_8601_BUFSIZ 32
+
+int strtimeval_iso(struct timeval *tv, int flags, char *buf, size_t bufsz);
+int strtm_iso(struct tm *tm, int flags, char *buf, size_t bufsz);
+int strtime_iso(const time_t *t, int flags, char *buf, size_t bufsz);
#endif /* UTIL_LINUX_TIME_UTIL_H */