[GODRIVER-1092] Timestamp in ObjectID is stored as uint32 Created: 28/May/19  Updated: 11/Sep/19  Resolved: 05/Jun/19

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Chris Hansen Assignee: Divjot Arora (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It seems that the 'time' component of primitive.ObjectID is stored in the first 4 bytes of the ObjectID. Will this not be a problem when we reach 2038?
I realise that expanding to an int64 would likely not be an option in a slice of 12 bytes, but if it can't be fixed, should it at least not be emphasised in the docs?

 



 Comments   
Comment by Divjot Arora (Inactive) [ 05/Jun/19 ]

chan58 As per the ObjectID specification (https://github.com/mongodb/specifications/blob/master/source/objectid.rst), the timestamp field is interpreted as a uint32, so it will be valid until Jan 7th, 2106.

Generated at Thu Feb 08 08:35:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.