X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_time.h;h=29db9d2444f1cf2a3beb5b6e8f1d19cf8a316db4;hb=eb336ef9b195ca67d99cdbdf0d2618653270c3e9;hp=46faa9ce44dbd89e8dcc85e7411fc259d6138c4d;hpb=b66d5b90a0e59e943a61acb4b68ce55e88f08ade;p=collectd.git diff --git a/src/daemon/utils_time.h b/src/daemon/utils_time.h index 46faa9ce..29db9d24 100644 --- a/src/daemon/utils_time.h +++ b/src/daemon/utils_time.h @@ -43,7 +43,7 @@ extern cdtime_t cdtime_mock; * manner is that comparing times and calculating differences is as simple as * it is with "time_t", i.e. a simple integer comparison / subtraction works. */ -/* +/* * cdtime_t is defined in "collectd.h" */ /* typedef uint64_t cdtime_t; */ @@ -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 : */