Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3856
| From | rabusta <rabusta@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: PyLZMA lastwritetime file to python datetime |
| Date | 2011-04-22 03:14 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <98f14a1d-c76b-4463-86b6-30a2af2aa11d@bl1g2000vbb.googlegroups.com> (permalink) |
| References | <56ecc37c-6fae-4b21-a468-6c7166cad5e1@y31g2000vbp.googlegroups.com> <mailman.738.1303463579.9059.python-list@python.org> |
On Apr 22, 5:12 pm, Chris Rebert <c...@rebertia.com> wrote: > [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/datetime.html#datetime.datetime.utcfro...http://docs.python.org/library/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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar
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