get the unix timestamp from type 1 uuid

前端 未结 4 933
挽巷
挽巷 2021-01-12 22:13

In our java application we are trying to get the unix time from the type 1 uuid. But its not giving the correct date time values.

long time = uuid.timestamp(         


        
4条回答
  •  走了就别回头了
    2021-01-12 22:30

    If you using datastax driver, it's:

    UUIDs.unixTimestamp(uuid)

    http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/utils/UUIDs.html#unixTimestamp(java.util.UUID)

提交回复
热议问题