diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2018-06-28 12:19:52 -0400 |
---|---|---|
committer | Justin Seyster <justin.seyster@mongodb.com> | 2018-06-28 17:13:49 -0400 |
commit | 3702862f8a5c26080bc995448207e5d8fd33b0ad (patch) | |
tree | bb191ceeead47ded50dc8e785b451163d394ed1c /src/mongo/bson/oid.h | |
parent | c41426385e88d1b8cd08b5fa39f445e184f86dc1 (diff) | |
download | mongo-3702862f8a5c26080bc995448207e5d8fd33b0ad.tar.gz |
Revert "SERVER-34975 Treat an OID-embedded timestamp as unsigned."
This reverts commit a9deb701a7533b566a2eb703aff70bf2f03b147c.
Diffstat (limited to 'src/mongo/bson/oid.h')
-rw-r--r-- | src/mongo/bson/oid.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/bson/oid.h b/src/mongo/bson/oid.h index 7f4f31a4369..4474a12dbe2 100644 --- a/src/mongo/bson/oid.h +++ b/src/mongo/bson/oid.h @@ -176,8 +176,9 @@ public: */ void initFromTermNumber(int64_t term); + time_t asTimeT() const; Date_t asDateT() const { - return Date_t::fromMillisSinceEpoch(getTimestamp() * 1000LL); + return Date_t::fromMillisSinceEpoch(asTimeT() * 1000LL); } // True iff the OID is not empty @@ -197,8 +198,8 @@ public: static unsigned getMachineId(); // used by the 'features' command static void regenMachineId(); - // Timestamp is a 4-byte positive integer so we use uint32_t - typedef uint32_t Timestamp; + // Timestamp is 4 bytes so we just use int32_t + typedef int32_t Timestamp; // Wrappers so we can return stuff by value. struct InstanceUnique { |