[Python-Dev] PEP: New timestamp formats

Walter Dörwald walter at livinglogic.de
Fri Feb 3 08:40:30 CET 2012


Am 03.02.2012 um 01:59 schrieb Nick Coghlan <ncoghlan at gmail.com>:

> On Fri, Feb 3, 2012 at 10:21 AM, Victor Stinner
> <victor.stinner at haypocalc.com> wrote:
>> I updated and completed my PEP and published the last draft. It will
>> be available at:
>> http://www.python.org/dev/peps/pep-0410/
>> ( or read the source: http://hg.python.org/peps/file/tip/pep-0410.txt )
>> 
>> I tried to list all alternatives.
> 
> [...]
> 
> datetime.datetime
> 
> - as noted earlier in the thread, total_seconds() actually gives you a
> decent timestamp value and always returning UTC avoids timezone issues
> - real problem with the idea is that not all timestamps can be easily
> made absolute (e.g. some APIs may return "time since system started"
> or "time since process started")
> - the complexity argument used against timedelta also applies

Wasn't datetime supposed to be the canonical date/time infrastructure that everybody uses? Why do we need yet another way to express a point in time? And even if we're going with Decimal, at least datetime.datetime should we extended to support the higher resolution (in fact it's the one where this can be done with no or minimal backward compatibility problems).

> [other alternatives]

Servus,
   Walter



More information about the Python-Dev mailing list