BSON_OID_GET_TIME_T(3)

πŸ’… BSON_OID_GET_TIME_T β€” libbson ✨

Okay bestie, gather round, because this one is a little function with main character energy and it does exactly one thing. It's from libbson (yes, the MongoDB-adjacent one), and it's basically a time machine for ObjectIDs. πŸ•°οΈβœ¨


🌸 SYNOPSIS 🌸

time_t
bson_oid_get_time_t (const bson_oid_t *oid);

That's it. That's the whole vibe. πŸŽ€


πŸ¦‹ PARAMETERS πŸ¦‹

  • oid β€” a bson_oid_t. Just the one. That's your whole input, bestie. πŸ’œ

✨ DESCRIPTION ✨

So what does it actually do? It fetches the generation time in seconds since the UNIX Epoch of oid. Lowkey iconic: your OID remembers when it was born, and this function will tell you. No cap. 🫢


πŸ’– RETURNS πŸ’–

A time_t containing the seconds since the UNIX epoch of oid. So you get a real, proper time_t back β€” not a string, not a struct, not a vibe. An actual number of seconds. Slay. ⭐

Heads up bestie: same deal as always β€” oid has to be a valid bson_oid_t pointer, because this function is gonna go read it. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc. Periodt. πŸ’…


2009-present, MongoDB, Inc. β€” like, they've been at this a while. Respect. πŸŽ€


And that's the whole page, bestie! libbson 2.5.6, dated Oct 09, 2026 β€” go forth and get those timestamps. πŸ¦‹πŸ’–πŸ”₯

πŸ“¦ where this page comes from