PyLZMA lastwritetime file to python datetime

R

rabusta

[Mildly educated guess after scanninghttps://github.com/fancycode/pylzma/blob/master/py7zlib.py]:

It's likely a Unix timestamp. Perhaps try
datetime.datetime.utcfromtimestamp() or
datetime.datetime.fromtimestamp() ?http://docs.python.org/library/date...ibrary/datetime.html#datetime.datetime.fromti...

Thanks for the reply!
but lastwritetime contains 64bit value and function
datetime.fromtimestamp an error (timestamp out of range for platform
time_t), I tried to take only the upper 32bit, but it does not
correspond to the actual date file...

for example:
f.header.files.files[0]['lastwritetime']
14620470108690448384L

real date: 2010-04-28 06:22:20
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top