Add RFC3339 Zulu time functions
[collectd.git] / src / daemon / utils_time.h
index 4d88dcc..29db9d2 100644 (file)
@@ -85,6 +85,9 @@ cdtime_t cdtime (void);
 #define RFC3339_SIZE     26
 #define RFC3339NANO_SIZE 36
 
+#define RFC3339_ZULU_SIZE     21
+#define RFC3339NANO_ZULU_SIZE 31
+
 /* rfc3339 formats a cdtime_t time in RFC 3339 format with second precision. */
 int rfc3339 (char *buffer, size_t buffer_size, cdtime_t t);
 
@@ -92,5 +95,13 @@ int rfc3339 (char *buffer, size_t buffer_size, cdtime_t t);
  * precision. */
 int rfc3339nano (char *buffer, size_t buffer_size, cdtime_t t);
 
+/* rfc3339 formats a cdtime_t time in RFC 3339 zulu format with second
+ * precision. */
+int rfc3339_zulu (char *buffer, size_t buffer_size, cdtime_t t);
+
+/* rfc3339nano formats a cdtime_t time in RFC 3339 zulu format with nanosecond
+ * precision. */
+int rfc3339nano_zulu (char *buffer, size_t buffer_size, cdtime_t t);
+
 #endif /* UTILS_TIME_H */
 /* vim: set sw=2 sts=2 et : */