poco
poco copied to clipboard
Poco::UUID/UUIDGenerator: add support for Version 6 and Version 7 UUIDs
Version 7 UUIDs (UUIDv7) are designed for keys in high-load databases and distributed systems. UUIDv7 begins with a 48 bit big-endian Unix Epoch timestamp with approximately millisecond granularity. The timestamp can be shifted by any time shift value. Directly after the timestamp follows the version nibble, that must have a value of 7. The variant bits have to be 10x. Remaining 74 bits are random seeded counter (optional, at least 12 bits but no longer than 42 bits) and random.
https://uuid.ramsey.dev/en/stable/rfc4122/version7.html