I'm comparing two time
objects with different timezones, and looks like it's actually ignoring the timezone, testing only the hour/minute/second components.
Let's create two time
objects:
from datetime import time
import pytz
CET = pytz.timezone('CET')
Japan = pytz.timezone('Japan')
t1 = time(1,2,3, tzinfo=CET)
t2 = time(1,2,3, tzinfo=Japan)
Printing them, we see that they're pretty different:
datetime.time(1, 2, 3, tzinfo=<DstTzInfo 'CET' CET+1:00:00 STD>)
datetime.time(1, 2, 3, tzinfo=<DstTzInfo 'Japan' JST+9:00:00 STD>)
Now, let's compare them:
t1 == t2
#-> True
Ehm, what? How is it possible that Python treats them equal?