From: Brian ONeill Date: Fri, 8 Feb 2019 16:41:18 +0000 (-0500) Subject: rrdcached plugin: changed time format to no longer lose microseconds when sending... X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=a10fb163601ca09ee160dac3b3d6f0707f01b8fd 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 --- 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;