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


Groups > comp.lang.python > #75412

Re: converting ISO8601 date and time string representations to datetime

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 <skip.montanaro@gmail.com>
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 <roy-FFB727.07524431072014@news.panix.com>
References <mailman.12461.1406797909.18130.python-list@python.org> <roy-FFB727.07524431072014@news.panix.com>
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 <skip@pobox.com>
To Roy Smith <roy@panix.com>
Content-Type text/plain; charset=UTF-8
Cc Python <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12463.1406811576.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith <roy@panix.com> 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

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


Thread

converting ISO8601 date and time string representations to datetime Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-31 11:11 +0200
  Re: converting ISO8601 date and time string representations to datetime Roy Smith <roy@panix.com> - 2014-07-31 07:52 -0400
    Re: converting ISO8601 date and time string representations to datetime Skip Montanaro <skip@pobox.com> - 2014-07-31 07:59 -0500
    Re: converting ISO8601 date and time string representations to datetime Roy Smith <roy@panix.com> - 2014-07-31 09:13 -0400
    Re: converting ISO8601 date and time string representations to datetime Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-07-31 15:29 +0200

csiph-web