Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3854

Re: PyLZMA lastwritetime file to python datetime

References <56ecc37c-6fae-4b21-a468-6c7166cad5e1@y31g2000vbp.googlegroups.com>
Date 2011-04-22 02:12 -0700
Subject Re: PyLZMA lastwritetime file to python datetime
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.738.1303463579.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Apr 22, 2011 at 1:49 AM, rabusta <rabusta@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

PyLZMA lastwritetime file to python datetime rabusta <rabusta@gmail.com> - 2011-04-22 01:49 -0700
  Re: PyLZMA lastwritetime file to python datetime Chris Rebert <clp2@rebertia.com> - 2011-04-22 02:12 -0700
    Re: PyLZMA lastwritetime file to python datetime rabusta <rabusta@gmail.com> - 2011-04-22 03:14 -0700

csiph-web