From d3db3ba2afca9830550d9dda3841fcd68017971a Mon Sep 17 00:00:00 2001 From: Karl Lehenbauer Date: Sat, 22 Feb 2014 00:12:23 +0000 Subject: [PATCH] The bson data type that's a UNIX epoch is date, not clock. BUGZID: --- README.md | 2 +- generic/bson.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cb9f53b..36ccf7a 100755 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Append a key and value to the bson object where the value is a double-precision Append a key and a boolean value to the bson object. -* $bson clock $key $epoch +* $bson date $key $epoch Append a key and epoch to the bson object. Stored in milliseconds but program multiplies by 100. Probably shouldn't and you should use clock clicks -milliseconds for current time. diff --git a/generic/bson.c b/generic/bson.c index faf254c..dd3f714 100644 --- a/generic/bson.c +++ b/generic/bson.c @@ -624,7 +624,7 @@ mongotcl_appendBsonFromObjects(Tcl_Interp *interp, bson *bson, Tcl_Obj *CONST bs "long", "double", "bool", - "clock", + "date", "null", "undefined", "binary_generic", @@ -642,7 +642,7 @@ mongotcl_appendBsonFromObjects(Tcl_Interp *interp, bson *bson, Tcl_Obj *CONST bs OPT_APPEND_LONG, OPT_APPEND_DOUBLE, OPT_APPEND_BOOL, - OPT_APPEND_CLOCK, + OPT_APPEND_DATE, OPT_APPEND_NULL, OPT_APPEND_UNDEFINED, OPT_APPEND_BINARY_GENERIC, @@ -679,7 +679,7 @@ mongotcl_appendBsonFromObjects(Tcl_Interp *interp, bson *bson, Tcl_Obj *CONST bs return mongotcl_appendBsonFromObject(interp, bson, BSON_BOOL, 0, key, valueObj); } - case OPT_APPEND_CLOCK: { + case OPT_APPEND_DATE: { return mongotcl_appendBsonFromObject(interp, bson, BSON_DATE, 0, key, valueObj); }