From a10fb163601ca09ee160dac3b3d6f0707f01b8fd Mon Sep 17 00:00:00 2001 From: Brian ONeill Date: Fri, 8 Feb 2019 11:41:18 -0500 Subject: [PATCH] rrdcached plugin: changed time format to no longer lose microseconds when sending to rrdcached. See https://lists.oetiker.ch/pipermail/rrd-developers/2003-March/001007.html for we want this --- src/rrdcached.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rrdcached.c b/src/rrdcached.c index 125a317b..d2547146 100644 --- a/src/rrdcached.c +++ b/src/rrdcached.c @@ -66,8 +66,8 @@ static int value_list_to_string(char *buffer, int buffer_len, memset(buffer, '\0', buffer_len); - time_t t = CDTIME_T_TO_TIME_T(vl->time); - int status = snprintf(buffer, buffer_len, "%lu", (unsigned long)t); + double t = CDTIME_T_TO_DOUBLE(vl->time); + int status = snprintf(buffer, buffer_len, "%f", t); if ((status < 1) || (status >= buffer_len)) return -1; int offset = status; -- 2.11.0