Permalink
Browse files

Properly convert between JS dates and Cocoa dates.

JS dates are milliseconds since epoch, while Cocoa dates are seconds since epoch.
  • Loading branch information...
francois committed Jul 17, 2010
1 parent 4561c41 commit 74b645c77ac7086be0fdafb8de349a49e64365a3
Showing with 1 addition and 1 deletion.
  1. +1 −1 MEUtils.m
@@ -54,7 +54,7 @@ +(NSObject *)objectFromBsonIterator:(bson_iterator *)it {
case bson_date:
case bson_timestamp:
return [NSDate dateWithTimeIntervalSince1970:bson_iterator_date(it)];
return [NSDate dateWithTimeIntervalSince1970:bson_iterator_date(it) / 1000L];
default:
NSLog(@"MEUtils does not handle type %d", bson_iterator_type(it));

0 comments on commit 74b645c

Please sign in to comment.