Skip to content

Commit

Permalink
The bson data type that's a UNIX epoch is date, not clock.
Browse files Browse the repository at this point in the history
BUGZID:
  • Loading branch information
lehenbauer committed Feb 22, 2014
1 parent fcaa34b commit d3db3ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions generic/bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ mongotcl_appendBsonFromObjects(Tcl_Interp *interp, bson *bson, Tcl_Obj *CONST bs
"long",
"double",
"bool",
"clock",
"date",
"null",
"undefined",
"binary_generic",
Expand All @@ -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,
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit d3db3ba

Please sign in to comment.