From cf9ac771ade7c5ba75ab13d2b4f2482983994840 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 7 Jul 2011 16:59:13 +0200 Subject: [PATCH] src/utils_format_json.c: Correctly format the time of value lists. Users should get epoch, not our internal format. --- src/utils_format_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_format_json.c b/src/utils_format_json.c index 65c886b6..2a5526b2 100644 --- a/src/utils_format_json.c +++ b/src/utils_format_json.c @@ -264,7 +264,7 @@ static int value_list_to_json (char *buffer, size_t buffer_size, /* {{{ */ return (status); BUFFER_ADD (",\"dsnames\":%s", temp); - BUFFER_ADD (",\"time\":%lu", (unsigned long) vl->time); + BUFFER_ADD (",\"time\":%.3f", CDTIME_T_TO_DOUBLE (vl->time)); BUFFER_ADD (",\"interval\":%.3f", CDTIME_T_TO_DOUBLE (vl->interval)); #define BUFFER_ADD_KEYVAL(key, value) do { \ -- 2.30.2