get the unix timestamp from type 1 uuid

前端 未结 4 934
挽巷
挽巷 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:39

    In the case someone else needs it:

    long milliseconds = UuidUtil.extractUnixMilliseconds(uuid);
    

    https://github.com/f4b6a3/uuid-creator

提交回复
热议问题