I want to convert a epoch time say 1639514232 to time UUID and save it to cassandra. UUIDs.endOf()
is not working and generating a decipherable uuid 5e23b68f-2cbb-11b2-7f7f-7f7f7f7f7f7f
.
Can you suggest how can I achieve it.
Asked
Active
Viewed 195 times
0

beskar
- 55
- 1
- 10
-
`UUIDs.endOf()` does its work - you need to have random right part? – Alex Ott Dec 18 '21 at 12:56
-
Perhaps a TimeUUID (type 1 UUID) might be better suited for this? – Aaron Dec 18 '21 at 22:24
-
@Aaron You mean to say `val timeBasedUuid = UUIDs.timeBased` and which method to use to convert epoch to uuid ? – beskar Dec 20 '21 at 10:27
-
@AlexOtt I am using `UUIDs.endOf(accountCreateTime)` where accountCreateTime =1639514232 , its not working ;giving undecipherable time `5e23b68f-2cbb-11b2-7f7f-7f7f7f7f7f7f` – beskar Dec 20 '21 at 10:29