Show HN: Generate Version 7 UUID's for a Timestamp(uuidv7.org)
uuidv7.org
Show HN: Generate Version 7 UUID's for a Timestamp
https://uuidv7.org/
3 comments
These time range queries using UUIDs are super useful. I don't understand why it took so long for UUIDv7 to become a standard. Even MongoDB had to use something custom (ObjectID) rather than UUID because this standard didn't exist.
My understanding is UUIDv6 can also be sorted lexically as it also uses a timestamp (v1 has improper endianness for sorting).
All the simple, fast tools I found online were focused on generating bulk ids or converting from an ID to a timestamp rather than the other way around, so I wrote one myself.
For example if I wanted to find everything that happened between 2025-03-11T13:00:00.000Z and 2025-03-11T13:59:59.999Z I can type in the timestamp, select earliest (or latest) to get the min/max and copy the identifiers of 0195854a-6480-7000-8000-000000000000 and 01958581-52ff-7fff-bfff-ffffffffffff
Sharing in case someone else finds it as useful as I do.