projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0239d8d
)
write_mongodb plugin: Actually store time as "date" type.
author
Florian Forster
<octo@collectd.org>
Mon, 5 Mar 2012 09:35:58 +0000
(10:35 +0100)
committer
Florian Forster
<octo@collectd.org>
Mon, 5 Mar 2012 09:35:58 +0000
(10:35 +0100)
src/write_mongodb.c
patch
|
blob
|
history
diff --git
a/src/write_mongodb.c
b/src/write_mongodb.c
index
f61d622
..
4f866bc
100644
(file)
--- a/
src/write_mongodb.c
+++ b/
src/write_mongodb.c
@@
-87,7
+87,7
@@
static int wm_write (const data_set_t *ds, /* {{{ */
ssnprintf(collection_name, sizeof (collection_name), "collectd.%s", vl->plugin);
bson_init(&record);
- bson_append_d
ouble (&record, "time", CDTIME_T_TO_DOUBLE
(vl->time));
+ bson_append_d
ate (&record, "time", (bson_date_t) CDTIME_T_TO_MS
(vl->time));
bson_append_string (&record, "host", vl->host);
bson_append_string (&record, "plugin_instance", vl->plugin_instance);
bson_append_string (&record, "type", vl->type);