STINNER Victor added the comment:
'seconds' - %H:%M:%S
'us' - %H:%M:%S.%f
'us' is not consistent with the datetime module: it should be 'microseconds.
datetime.datetime.now().second
50
datetime.timedelta(seconds=1)
datetime.timedelta(0, 1)
datetime.datetime.now().microsecond
123710
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: resolved - needs patch
superseder: datetime: add ability to parse RFC 3339 dates and times -
versions: +Python 3.6 -Python 3.5
___
Python tracker rep...@bugs.python.org
Changes by Jerry Elmore jerry.r.elm...@gmail.com:
--
nosy: +Jerry Elmore
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Alexander Belopolsky added the comment:
Here is some prior art: GNU date utility has an --iso-8601[=timespec] option
defined as
‘-I[timespec]’
‘--iso-8601[=timespec]’
Display the date using the ISO 8601 format, ‘%Y-%m-%d’.
The argument timespec specifies the number of additional terms of the
Alexander Belopolsky added the comment:
Based on GNU date prior art, we can introduce timespec='auto' keyword
argument with the following values:
'auto' - (default) same as current behavior
'hours' - %H
'minutes' - %H:%M
'seconds' - %H:%M:%S
'us' - %H:%M:%S.%f
--
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Python-bugs-list
Alexander Belopolsky added the comment:
MAL: Have you thought about the rounding/truncation issues
associated with not showing microseconds ?
I believe it has to be the truncation. Rounding is better left to the user
code where it can be done either using timedelta arithmetics or at the time
Marc-Andre Lemburg added the comment:
On 06.11.2013 16:51, Alexander Belopolsky wrote:
MAL: Have you thought about the rounding/truncation issues
associated with not showing microseconds ?
Sure, otherwise I wouldn't have mentioned it :-)
mxDateTime always uses 2 digit fractions when
Alexander Belopolsky added the comment:
I am afraid that the rounding issues may kill this proposal. Can we start with
something simple? For example, we can start with show=None keyword argument
and allow a single value 'microseconds' (or 'us'). This will solve the issue
at hand with a
Skip Montanaro added the comment:
I am afraid that the rounding issues may kill this proposal. Can we start
with something simple? For example, we can start with show=None keyword
argument and allow a single value 'microseconds' (or 'us'). This will solve
the issue at hand with a
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Python-bugs-list
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Alexander Belopolsky added the comment:
+1 on adding an option to isoformat(). We already have an optional sep
argument, so the symmetry with __str__ is not complete. To make this option
more useful, rather than implementing always_emit_microseconds=False flag, I
would add a keyword
Andrei Dorian Duma added the comment:
I would like to implement this feature. I already wrote the Python part. Is
there anything else to decide?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
STINNER Victor added the comment:
2013/11/5 Alexander Belopolsky rep...@bugs.python.org:
+1 on adding an option to isoformat(). We already have an optional sep
argument, so the symmetry with __str__ is not complete. To make this option
more useful, rather than implementing
Alexander Belopolsky added the comment:
+1 on all Victor's points.
I like 'resolution' because this is the term that datetime module uses already:
from datetime import *
datetime.resolution
datetime.timedelta(0, 0, 1)
There is a slight chance of confusion stemming from the fact that
Marc-Andre Lemburg added the comment:
On 05.11.2013 21:31, STINNER Victor wrote:
2013/11/5 Alexander Belopolsky rep...@bugs.python.org:
+1 on adding an option to isoformat(). We already have an optional sep
argument, so the symmetry with __str__ is not complete. To make this option
Changes by Andrei Dorian Duma andrei.duma.dor...@gmail.com:
--
nosy: +andrei.duma
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Terry J. Reedy added the comment:
As I understand Guido's message, he reopened this to consider adding a new
parameter.
Given an existing csv file like that given, either Tim's solution or
try: parse with microseconds
except ValueError: parse without
should work.
--
nosy: +terry.reedy
19 matches
Mail list logo