alphagov/smart-answers — pull request #867 by heathd (2014-05-09 13:33:19+00:00)
Title: Fixing date bugs

The friendly_time_diff method was doing its calculations using DateTime
values rather than dates. The DateTimes sometimes have different
timezone values (depending on how they were generated), or may be a mix
of timezone aware and timezone-unaware date classes.

I've re-implemented the friendly_time_diff method in a way which uses
Dates for the calculations. Dates are not sensitive to timezone issues.
The friendly_time_diff method actually only calculates differences at a
date-granularity so this works better.

Also fixed intermittent error in ICSRendererTest.