diff options
Diffstat (limited to 'src/mongo/bson/bsonelement.h')
-rw-r--r-- | src/mongo/bson/bsonelement.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index cc5c687f8d7..a5919d7f6d7 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -454,9 +454,10 @@ namespace mongo { } Timestamp timestamp() const { + Timestamp result; if( type() == mongo::Date || type() == bsonTimestamp ) - return Timestamp(ConstDataView(value()).readLE<unsigned long long>()); - return Timestamp(); + result.readFrom(value()); + return result; } Date_t timestampTime() const { |