Code

Changes between Version 251 and Version 252 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
08/26/08 01:22:34 (6 years ago)
Author:
mtredinnick
Comment:

Added note about error handling for timezone-different comparisons.

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v251 v252  
    12241224 
    12251225[8557] replaced `django.contrib.comments` with a modern system that's actually documented. It's also quite different from the old undocumented system; anyone who was using it should read the [http://docs.djangoproject.com/en/dev/ref/contrib/comments/upgrade/ upgrading guide]. 
     1226 
     1227== Fixed timesince filter to handle timezone-aware times == 
     1228 
     1229In [8579], the `timesince` filter was fixed to work correctly with times that have a timezone attached. As a consequence of this, comparing a timezone-aware datetime value with a timezone-''un''aware (or timezone-naive) datetime returns a different result. Previously, it returned a completely incorrect result by just ignoring the timezone. Now, the error is handled in a more consistent (for Django) fashion by being treated as an actual error and returning an empty string. So the incorrect result will no longer display. 
     1230 
     1231The "fix" here is to not compare two values unless they either both have timezones or both do not have timezones. Code that wasn't doing this was already broken previously. Now it will be more obvious.