I\'m trying to compare two times using the Python datetime module, but I can\'t seem to create a timezone-aware time object in UTC.
I'm guessing that the problem is that UTC is considered to be not-any-timezone, or "offset-naive", perhaps? I'd recommend converting everything to UTC before doing any comparisons.
You need to know timezones for inputs and outputs, obviously, but you should try to keep your internal representations all in UTC, and maybe just store the timezone of each user and convert when you need to. It will save a lot of headache in the long run.
Also, you shouldn't do it this way. It's better to use
timezone.localize(dt)
as explained here: http://pytz.sourceforge.net/#localized-times-and-date-arithmetic