Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'parser': 0.07; 'pypi': 0.07; 'received:209.85.160.174': 0.07; 'accuracy.': 0.09; 'throw': 0.09; 'thrown': 0.09; 'timestamps': 0.09; 'dec': 0.15; 'it..': 0.16; 'subject:dates': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'handles': 0.18; 'module': 0.19; 'import': 0.21; 'greg': 0.22; 'parse': 0.22; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'common': 0.26; '-0700,': 0.29; 'handle': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'whatever': 0.35; 'formats': 0.35; "won't": 0.35; 'received:209.85': 0.35; 'michael': 0.36; 'but': 0.36; 'message- id:@gmail.com': 0.36; 'anything': 0.36; 'charset:us-ascii': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'content-disposition:inline': 0.60; 'kind': 0.61; 'american': 0.73; 'donald': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vXNX8XcYCJCx3krCx/Fywer/gxgql1HXVT16R70hQVU=; b=ocb83ayviM/1WCVuY+8TYRV7+65cEHw5jVdOPvKo36F6o/m5xTiEKTNZdtYgmwy5Bq jHUBcJ61IHk3JZCw9tRa7yWbSEpmuaf7BnzruqnO/RJ9MaGzFaw1FuvkgdLtOVg/4pzv ccOXuGYWgGIVp53sf65rCIjTlMeZyraSbWioFmsEv9kIzsaIUN+0y/POapUuwQXpvc/7 D98oKGbA/jAmc/kUU8iAHMfQMIZe/jYhvOCFF/tRpLM4xjFn99sqegN0Br4uRVqS6Bxu ElogN07euLzKYHTosxFc8mzQMQP5zElx9+D1L7teDWuj6NKfgJc45+CCqozycQRI5FOH ek+Q== Date: Tue, 11 Dec 2012 02:35:29 -0600 From: Greg Donald To: python-list@python.org Subject: Re: strptime - dates formatted differently on different computers References: <50C6C5E7.1030300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50C6C5E7.1030300@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355214941 news.xs4all.nl 6920 [2001:888:2000:d::a6]:49944 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34606 On Mon, Dec 10, 2012 at 10:34:31PM -0700, Michael Torrie wrote: > I use a module I got from pypi called dateutil. It has a nice submodule > called parser that can handle a variety of date formats with good > accuracy. Not sure how it works, but it handles all the common American > date formats I've thrown at it. from dateutil.parser import parse dt = parse( whatever ) I've throw all kind of date and timestamps at it.. have yet to see anything it won't parse. -- Greg Donald