Show HN: Generate Version 7 UUID's for a Timestamp

I use UUIDv7's in multiple places as an efficient index in Postgres. When querying this data I usually need to be able to query between a time range so wanted to have a quick way to generate a reference ID that I could use in a BETWEEN query.

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.


Comments URL: https://news.ycombinator.com/item?id=43332226

Points: 7

# Comments: 0

https://uuidv7.org/

Utworzony 1d | 11 mar 2025, 15:20:17


Zaloguj się, aby dodać komentarz

Inne posty w tej grupie

Show HN: We built Lovable for Mobile Apps (uses Flutter)

Hey HN. We built an AI agent, Avid, that creates beautiful Flutter Apps, much like v0 or Lovable. The agent carefully makes UI UX considerations, generates Flutter code, and you get a preview on y

12 mar 2025, 17:20:07 | Hacker news
Show HN: AudioNimbus – Steam Audio's immersive spatial audio, now in Rust

Hi HN! I’m excited to share AudioNimbus, a Rust library that brings the powerful spatial audio capabilities of Steam Audio to the Rust ecosystem. Whether you’re building games, VR/AR experiences,

12 mar 2025, 17:20:04 | Hacker news