Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'string': 0.09; 'slow.': 0.09; 'subject:string': 0.09; 'cc:addr:python-list': 0.11; '6:52': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'roy': 0.16; 'which,': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; '31,': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'feature': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'subject:time': 0.33; 'skip:d 20': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'useful': 0.36; 'easy': 0.60; 'life': 0.66; 'smith': 0.68; 'jul': 0.74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=FrXsHcW8AW3WGpECtGAe40K6f7B3D7m5Zr/J3rze/TQ=; b=JWRx45jzc6TlZmipyDpRzmIpqo0UnGyfLkpJ/+FDS4nTIMRBhnPn4QVS0Q8ELMPFkT 3WMstzOG1VjnN2XCuEECsx1xowSzMj1indP4aS7ohckuO8T5gW2OEEHRjJU8vqiQSYEh 6s7fVTstvTvq9+2DWqP38dUuPHi9LRepCDTUCezbCE4hlPGptgM60l5tNDDrZC9z4pm6 c+JINy0aFLLFSAHJwUMRz319EN14QA0USesNBeX82f8UlqvuBfAr68/b19Qov6/SJkvu MZ6IGROcyMSHXO1uB/pfGVoAt34iz44H/ydEbSn14I+TbWCzt5NNEmwY9KGcOWwpHw6N iFog== MIME-Version: 1.0 X-Received: by 10.42.82.6 with SMTP id b6mr14697806icl.51.1406811568173; Thu, 31 Jul 2014 05:59:28 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: References: Date: Thu, 31 Jul 2014 07:59:28 -0500 X-Google-Sender-Auth: h40YKbXFtsr4lMvEYRoaYUmt5SE Subject: Re: converting ISO8601 date and time string representations to datetime From: Skip Montanaro To: Roy Smith Content-Type: text/plain; charset=UTF-8 Cc: Python 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406811576 news.xs4all.nl 2851 [2001:888:2000:d::a6]:40849 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75412 On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith wrote: > Sadly, the stdlib datetime really doesn't make life easy for dealing > with ISO-8601. Dateutil is the classic answer, but it's slow. A useful feature for dateutil would be a "sniff" function which, given a date string that dateutil.parser.parse can handle, instead returns a format string suitable for use with time.strptime. Skip