summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0239d8d)
raw | patch | inline | side by side (parent: 0239d8d)
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 f61d6224f09705cb75efc425f37a7a03d89aea72..4f866bc84fc9158a2a266518fe2942a63dfa52f1 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
ssnprintf(collection_name, sizeof (collection_name), "collectd.%s", vl->plugin);
bson_init(&record);
- bson_append_double (&record, "time", CDTIME_T_TO_DOUBLE (vl->time));
+ bson_append_date (&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);