PyLZMA lastwritetime file to python datetime

Chris Rebert clp2 at rebertia.com
Fri Apr 22 11:12:51 CEST 2011


On Fri, Apr 22, 2011 at 1:49 AM, rabusta <rabusta at gmail.com> wrote:
> How convert lastwritetime file to python datetime?

[Mildly educated guess after scanning
https://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/datetime.html#datetime.datetime.utcfromtimestamp
http://docs.python.org/library/datetime.html#datetime.datetime.fromtimestamp

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list