Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python': 0.07; 'url:github': 0.09; 'url:py': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'subject:python': 0.15; 'url:blob': 0.16; 'subject:file': 0.16; 'url:blog': 0.18; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'cheers,': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr:python- list': 0.22; 'convert': 0.22; 'guess': 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'fri,': 0.29; 'cc:addr:python.org': 0.31; 'url:library': 0.31; 'perhaps': 0.32; 'url:docs': 0.33; 'file': 0.35; 'url:python': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'url:org': 0.38; 'likely': 0.39; 'how': 0.39; "it's": 0.40; 'header:Received:5': 0.40; '2011': 0.62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=4Ez8tjmf4IQ2QzvxWTXnbw8Jbu1DF3Annb3o4OSt0IA=; b=JfSBgEwrlCFqn2sFBuHIubttTkQmhPCgdNKgQic1DyDfR+2VpGNhcj4wn/FbFy1jus mHjwxjm29/y75iB/Nr57ByZOnrtkcDbfvJFBMwAdLMHTdglKn8vEwjNg6Jy0fVnWqa/k qwjnFfwtITtxspThXlLoCQ/4ozCSA1aPoVrow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ApDB4c+OOdIPA4ay/1NIuK37wo81+EpykNPqHRIv6cGibSTtUOEiaJ1oNbk1CISEc9 6YB7Lmmz8ZRHqQSMgy93flzckIIEBSygvCGB4l/c3XAOMJVufSK6vA8WKSYk+A/cVNEI rhIgpC11QOSKwnLVn2ZCuF13aB3bHzpe9nX/M= MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: <56ecc37c-6fae-4b21-a468-6c7166cad5e1@y31g2000vbp.googlegroups.com> References: <56ecc37c-6fae-4b21-a468-6c7166cad5e1@y31g2000vbp.googlegroups.com> Date: Fri, 22 Apr 2011 02:12:51 -0700 X-Google-Sender-Auth: 6x627y6Vzv2sKb7tsY7b00z1F4A Subject: Re: PyLZMA lastwritetime file to python datetime From: Chris Rebert To: rabusta Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303463579 news.xs4all.nl 34849 [::ffff:82.94.164.166]:47028 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3854 On Fri, Apr 22, 2011 at 1:49 AM, rabusta 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