[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-18 Thread Jason Killen
Jason Killen added the comment: Yep I wasn't seeing the forest for the trees. Thanks for clearing that up. I'll swoop back in and see what I can do. -- ___ Python tracker

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-17 Thread Paul Ganssle
Paul Ganssle added the comment: I do not think this is a bug in pytz, but if it's a bug in Python it's one in reporting what the error is. The issue is that the time zone offset for "rules-based zones" like America/Denver (i.e. most time zones) is *undefined* for bare times, because the

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-17 Thread Mike
Mike added the comment: Ok. I'll file a bug on pytz. Thanks! On Sat, Nov 16, 2019 at 11:18 PM Karthikeyan Singaravelan < rep...@bugs.python.org> wrote: > > Change by Karthikeyan Singaravelan : > > > -- > nosy: +p-ganssle > > ___ > Python tracker >

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-15 Thread Jason Killen
Jason Killen added the comment: This appears to be a bug in pytz which as far as I can tell is not part of the "standard" lib, at least it's not in Lib. Running this example which does not use pytz: from datetime import timedelta, datetime, tzinfo, timezone, time # stole this from the docs,

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-15 Thread Mike
New submission from Mike : import pytz import datetime tzaware_time1 = datetime.time(7,30,tzinfo=pytz.timezone("America/Denver")) tzaware_time2 = datetime.time(7,30,tzinfo=pytz.utc) tzunaware_time = datetime.time(7, 30) # This fails with exception: TypeError: can't compare offset-naive and