Skip to content

Instantly share code, notes, and snippets.

@stuarthalloway
Last active September 8, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuarthalloway/60abf20623e4b63bc4aa619f4cce9d38 to your computer and use it in GitHub Desktop.
Save stuarthalloway/60abf20623e4b63bc4aa619f4cce9d38 to your computer and use it in GitHub Desktop.
(defn squuid-created-at
"Pull the date back out of a squuid. This will be nonsense if the UUID
passed in was not a squuid!"
[^java.util.UUID uuid]
(let [secs (bit-shift-right (.getMostSignificantBits uuid) 32)]
(java.util.Date. (* secs 1000))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment