summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc433b9)
raw | patch | inline | side by side (parent: dc433b9)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 Aug 2014 03:12:58 +0000 (20:12 -0700) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 Aug 2014 03:12:58 +0000 (20:12 -0700) |
Typos caused the end-time and all values to be treated incorrectly.
src/core/store.c | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index c778c52d7dd4a234890b381bea8fb5434a4bab0a..3bc111496ab9a64f5c79a517ccec41e8298f24f2 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
snprintf(start_str, sizeof(start_str), "<error>");
start_str[sizeof(start_str) - 1] = '\0';
if (! sdb_strftime(end_str, sizeof(end_str),
- "%F %T %z", ts->start))
+ "%F %T %z", ts->end))
snprintf(end_str, sizeof(end_str), "<error>");
end_str[sizeof(end_str) - 1] = '\0';
time_str[sizeof(time_str) - 1] = '\0';
sdb_strbuf_append(buf, "{\"timestamp\": \"%s\", "
- "\"value\": \"%s\"}", time_str, ts->data[i][j].value);
+ "\"value\": \"%f\"}", time_str, ts->data[i][j].value);
if (j < ts->data_len - 1)
sdb_strbuf_append(buf, ",");