New submission from Mike <mikesut...@gmail.com>:
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 offset-aware times # even though both ARE tz aware. tzaware_time1 < tzaware_time2 # This does NOT raise an exception and should since one is aware and one isn't. tzunaware_time < tzaware_time1 ---------- messages: 356673 nosy: epicadv priority: normal severity: normal status: open title: Comparing datetime.time objects incorrect for TZ aware and unaware versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38812> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com