I have some UUIDs that are being generated in my program at random, but I want to be able to extract the timestamp of the generated UUID for testing purposes. I noticed that using the fields accessor I can get the various parts of the timestamp but I have no idea on how to combine them.
I have some UUIDs that are being generated in my program at random, but
Share
Looking inside /usr/lib/python2.6/uuid.py you’ll see
solving the equations for time.time(), you’ll get
So use:
This gives the datetime associated with a UUID generated by
uuid.uuid1.