[Datetime-SIG] The BDFL's take

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Jul 29 17:32:55 CEST 2015


On Wed, Jul 29, 2015 at 10:49 AM, Lennart Regebro <regebro at gmail.com> wrote:
>>>> est = gettz('US/Eastern')
>>>> dt1 = datetime(2014, 11, 2, 0, 30, tzinfo=est)
>>>> dt1
> datetime.datetime(2014, 11, 2, 0, 30, tzinfo=tzfile('America/New_York'))
>>>> dt1 + timedelta(hours=1)
> datetime.datetime(2014, 11, 2, 1, 30, tzinfo=tzfile('America/New_York'))
>>>> dt1 + timedelta(hours=2)
> datetime.datetime(2014, 11, 2, 2, 30, tzinfo=tzfile('America/New_York'))
>
> In fact at 2am, the hour swithes back one hour, so two hours after
> 00:30 is 01:30. Yes, 01:30 happens twice. This means that the above
> calculations are incorrect.

But it is fair. "You get nothing for nothing in New York City,"  yet if you had
booked hockey time at the local ice rink ending 2014-11-02T02:00, you would
get an hour free.  A non-humane accounting program would charge you for that
extra hour, but a humane one does not and I like it that way. :-)


More information about the Datetime-SIG mailing list