> I'm interested in the use case for this.
> Why would you want to extract the exact timestamp from the uuid?
Because I can :-]
At this point it's primarily academic, but I'll be creating lots of
files and naming them with uuid's. I like the capability of determining creation
date solely from t
Kent Tenney wrote:
Howdy,
I have not found a routine to extract usable
date/time information from the 60 bit uuid1 timestamp.
Is there not a standard solution?
I submitted an ASPN recipe to do it.
http://code.activestate.com/recipes/576420/
I'm interested in the use case for this.
Why wo
> Howdy,
>
> I have not found a routine to extract usable
> date/time information from the 60 bit uuid1 timestamp.
>
> Is there not a standard solution?
I submitted an ASPN recipe to do it.
http://code.activestate.com/recipes/576420/
--
http://mail.python.org/mailman/listinfo/python-list
Howdy Kent,
Interesting question! Give this a shot:
import datetime
import time
import uuid
# get offset in seconds between the UUID timestamp Epoch (1582-10-15)
and
# the Epoch used on this computer
DTD_SECS_DELTA = (datetime.datetime(*time.gmtime(0)[0:3])-
datetime.datetime(1582, 10, 15)).day
Howdy,
I have not found a routine to extract usable
date/time information from the 60 bit uuid1 timestamp.
Is there not a standard solution?
Thanks,
Kent
--
http://mail.python.org/mailman/listinfo/python-list