The issue reported in the StackOverflow link is not really relevant. I am not saying there isn't an issue here. I really want be shown what it is though. The problem on SO is that poster is trying to compare datetimes in the databases to a very specific datetime or a date object. It is easy to see that won't work because equality checks will require an exact match. When Django is given a date object to do a datetime comparison it will just fill in the time with midnight.

We are not doing that in the code you've changed. We are using ``__year`` and ``__month`` lookups which result in SQL like:

    WHERE (EXTRACT(\'month\' FROM "product_subscription"."start") = 6 AND "product_subscription"."start" BETWEEN 2013-01-01 00:00:00 and 2013-12-31 23:59:59.999999)

Which doesn't suffer from the problem being reported on SO.

I assume you made this change because you saw a real issue. If you can help me reproduce this issue I'd be glad to accept a fix for it.

Furthermore, I don't see how this is relevant to goal of the PR which is add Python 3 and Django 1.5 support.