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


Groups > comp.lang.python > #96596

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <random832@fastmail.com>
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; 'subject:: [': 0.03; 'sufficient': 0.05; 'cc:addr:python-list': 0.09; 'considered.': 0.09; 'received:internal': 0.09; 'timestamps': 0.09; 'assume': 0.11; 'alexander': 0.16; 'fold': 0.16; 'freedoms': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'naive': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:compute4.internal': 0.16; 'received:messagingengine.com': 0.16; 'reversed': 0.16; 'utc': 0.16; 'wrote:': 0.16; 'exists': 0.18; 'subject:] ': 0.19; 'library': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; "aren't": 0.22; 'deployed': 0.22; 'sep': 0.22; 'subject:skip:i 10': 0.22; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'sort': 0.25; 'developers': 0.26; '14,': 0.27; 'values': 0.28; 'fine': 0.28; "i'm": 0.30; 'that.': 0.30; 'code': 0.30; "can't": 0.32; 'implement': 0.32; 'true.': 0.33; 'gets': 0.35; 'done': 0.35; 'library.': 0.35; 'widely': 0.35; "isn't": 0.35; 'according': 0.36; 'but': 0.36; 'there': 0.36; 'possible': 0.36; 'subject:" ': 0.36; 'subject:?': 0.36; 'received:10': 0.37; 'two': 0.37; 'being': 0.37; 'received:66': 0.38; 'subject:-': 0.39; 'where': 0.40; 'your': 0.60; 'behavior': 0.61; 'header:Message-Id:1': 0.61; 'real': 0.62; 'today,': 0.62; 'different': 0.63; 'today': 0.65; 'subject:there': 0.66; 'talking': 0.67; 'therefore': 0.67; 'brand': 0.75; '2:45': 0.84; 'subject:any': 0.84; 'attitude': 0.91; 'have.': 0.93; 'subject:Are': 0.95
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Nhdf0RIyBFr4bWrNExffmjbqieA=; b=jkj1Ot +b81F8AB5YravROWCiZgCh0XnT+EGVZMFQ4uukLsNk1jsjpaTJJS01GQ2RPhQYtN HoNOu8dloopi3BtLFjQpcm9JMDxH8f9A93BDW6cWYoWjBlncudPQh03MHS6LOY+s cJmEFV83PXf2RR95WJWyK4WC+b57vwxqmMejc=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Nhdf0RIyBFr4bWr NExffmjbqieA=; b=aSJi0tqXySEdWO9QQpscF5H5sA3hXLNsMX9rjLNMyeONRbc YQxkEOpn2BaspWh4e09lj0HJCMx4hiN+X8mfxCDvhj3pfeedq4EnpGDwifoj4P/D C1xej+wuxjzqS0MNm4CxazoaYcnvGEt/2LXSEtix6X00LZwSgM+/jMrBfBEk=
X-Sasl-Enc CTCjbT/om7MJXO1dNHDS4u7bQegxRbjOdGlLCMxAjT/E 1442259852
From Random832 <random832@fastmail.com>
To Alexander Belopolsky <alexander.belopolsky@gmail.com>
Cc "Python-List" <python-list@python.org>, "datetime-sig" <datetime-sig@python.org>
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-c76b43ce
In-Reply-To <CAP7h-xZYsqVPOZ0ndj3CAumq_Pp4uQ+AgQC5hHVPH9YA793cAg@mail.gmail.com>
References <m2h9mzqyy7.fsf@fastmail.com> <CAExdVNm0rrxhbSONfQdor7e=9t+6Tg3hh6eFq-h0NnfdpteVYg@mail.gmail.com> <1442085362.324875.381920729.5E7A6DCE@webmail.messagingengine.com> <CAExdVNnUwRKN2q=trpnD9=mxnXvuosWKO+s5=PCfjAO45-Yugw@mail.gmail.com> <CAP7h-xYFAggqbJBNCZbYFwUqCPzW7-4Rc0x_SzgAumpFYAr6oA@mail.gmail.com> <CAExdVNmfTsqunRR_b-Q1YqWrTjsV1L5ppAoAnL7SUwgR2PFU0A@mail.gmail.com> <CAP7h-xbqq2Eu+vVO2g4WmbRJ=gmL1r9D2sWhKe=qQ8Ev-n415w@mail.gmail.com> <CAP7+vJ+1Vg21qOWAD+9R2REDnWiW4o6nj=Rh8fx3x3cAZipcdw@mail.gmail.com> <CAP7h-xbA6ZagKj+rQ_cCc8d0oK1F329AAhSjY240iiDyB4756A@mail.gmail.com> <CAExdVNnw6zfJQ_wFOurjj6kcLcbr9RgXA7kvyNPmgraMcHU4vQ@mail.gmail.com> <CAP7h-xYp=MsOcvFXNCHNkXDDGH=jcAwYSSw1WWchy5bwZKjwLA@mail.gmail.com> <201509131224.t8DCOXHO004891@fido.openend.se> <CAExdVNkN465=bWeY61PFAxpiUQ-u0p2zaqtwH8PQWyQO4Jw9Mg@mail.gmail.com> <201509131600.t8DG07e0025688@fido.openend.se> <CAExdVNm3e43mJ3tqcUc9175WssV4zeuO024svJbMTjrTab=Qew@mail.gmail.com> <201509132031.t8DKVTwJ028027@fido.openend.se> <CAExdVNkeRVgV8CXLugMgqhUSuXU=qHYSFUo24Xw83X=8tVBjCg@mail.gmail.com> <201509140827.t8E8RPqb001076@fido.openend.se> <CAExdVNn2wM8YW=Jg=aM86X6RaaVYPTioTSJ2d1gGp0k76CN3mg@mail.gmail.com> <1442257996.253100.383441705.7A0986C7@webmail.messagingengine.com> <CAP7h-xZYsqVPOZ0ndj3CAumq_Pp4uQ+AgQC5hHVPH9YA793cAg@mail.gmail.com>
Subject Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?
Date Mon, 14 Sep 2015 15:44:12 -0400
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.559.1442260353.8327.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1442260353 news.xs4all.nl 23806 [2001:888:2000:d::a6]:59709
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96596

Show key headers only | View raw


On Mon, Sep 14, 2015, at 15:25, Alexander Belopolsky wrote:
> This is a fine attitude when you implement your own brand new datetime
> library.  As an author of a new library you have freedoms that developers
> of a 12 years old widely deployed code don't have.

I'm talking about the real behavior of datetime as it exists *today*,
and has existed for the past 12 years, before any of this "add fold flag
but sort 2:15 fold1 before 2:45 fold0" nonsense gets in. It is an
invariant that is true today, and therefore which you can't rely on any
of the consumers of this 12 years old widely deployed code not to assume
will remain true.

Enforcing an invariant that all ordering is done according to UTC
timestamps would not break any backward compatibility, because there is
not a *single* pair of timestamps that can be represented today with any
*remotely* plausible tzinfo whose order is different from that. For that
matter, a tzinfo where two possible values for fold aren't sufficient to
disambiguate timestamps is *more* plausible than one where the naive
ordering of any two non-fold timestamps is reversed from the UTC order,
yet that case apparently isn't being considered.

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


Thread

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo? Random832 <random832@fastmail.com> - 2015-09-14 15:44 -0400

csiph-web