projects
/
platform
/
upstream
/
ejdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
410272c
)
#50 - advanced tests (test3)
author
Fedor Yudanov
<fedwiz@academ.org>
Tue, 2 Apr 2013 12:50:11 +0000
(19:50 +0700)
committer
Fedor Yudanov
<fedwiz@academ.org>
Tue, 2 Apr 2013 12:50:11 +0000
(19:50 +0700)
rbejdb/src/rbbson.c
patch
|
blob
|
history
diff --git
a/rbejdb/src/rbbson.c
b/rbejdb/src/rbbson.c
index
eea849d
..
7713b8c
100644
(file)
--- a/
rbejdb/src/rbbson.c
+++ b/
rbejdb/src/rbbson.c
@@
-224,7
+224,9
@@
VALUE bson_array_to_ruby(bson_iterator* it) {
}
VALUE bson_date_to_ruby(bson_date_t date) {
- return rb_funcall(rb_path2class("Time"), rb_intern("at"), 1, INT2NUM(date * 1000));
+ return rb_funcall(rb_path2class("Time"), rb_intern("at"), 2,
+ INT2NUM(date / 1000), // seconds
+ INT2NUM((date % 1000) * 1000)); // microseconds
}