alphagov/whitehall — pull request #1137 by evilstreak (2013-12-06 11:31:33+00:00)
Title: Fix closed consultation reindex rake task

Stop forcing the argument to a date in the closed_since scope and make
the rake task ask for all consultations which closed in the past 25
hours -- one hour longer than a day to allow for timing issues.

When closing_on was converted to a datetime and renamed to closing_at
the closed_since scope started behaving with a subtle difference.
When you give MySQL a date to use in a query against a datetime it
treats the date as being at 00:00:00. If you compare using
`closing_at >= '2013-12-06'` then if closing_at is a datetime on that
day it will not be matched, but if closing_at is a date of that day then
it will match.

Fixes https://www.pivotaltracker.com/story/show/61978984