projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e61872d
)
src/utils_format_json.c: Correctly format the time of value lists.
author
Florian Forster
<octo@huhu.verplant.org>
Thu, 7 Jul 2011 14:59:13 +0000
(16:59 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Thu, 7 Jul 2011 14:59:13 +0000
(16:59 +0200)
Users should get epoch, not our internal format.
src/utils_format_json.c
patch
|
blob
|
history
diff --git
a/src/utils_format_json.c
b/src/utils_format_json.c
index
65c886b
..
2a5526b
100644
(file)
--- 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 { \