[Datetime-SIG] Conversion vs arithmetic (was Re: Is EDT a timezone? Was: PEP-0500)

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Aug 25 01:23:20 CEST 2015


On Mon, Aug 24, 2015 at 7:01 PM, Carl Meyer <carl at oddbird.net> wrote:

> On 08/24/2015 03:58 PM, ISAAC J SCHWABACHER wrote:
> > [ijs]
> >>> I see how PEP 495 makes it possible to convert datetimes correctly
> >>> in all cases,
> >>
> > [Tim Peters]
> >> Whew!  You may well be only the second person to grasp this - thanks :-)
> >
> > Wait... was this ever in contention?
>
> I don't think so. I'm not sure what Tim is referring to here; I haven't
> seen any messages in this thread that indicated a lack of understanding
> on this point.
>

I cannot speak for Tim, but here is an exercise you can try to check your
grasp of PEP 495: given PEP-compliant utcoffset() and dst() methods for the
current rules in the US/Eastern timezone, write a PEP-compliant fromutc().
  You can start from the current datetime.py implementation. [1]

[1]: https://hg.python.org/cpython/file/v3.5.0rc1/Lib/datetime.py#l957
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150824/0cba94b9/attachment.html>


More information about the Datetime-SIG mailing list