CityOfPhiladelphia/myphillyrising — pull request #53 by mjumbewu (2013-12-09 08:42:44+00:00)
Title: Event bugs

This patch fixes the following bugs:

* All-day events would cause an error while being imported, since (1) we were assuming that all event times have a timezone, (2) the `icalendar` library represents all-day events with a `date` object instead of a `datetime`, and (3) `date` objects have no timezone information.

* Recurring events that straddled daylight savings time changes were causing errors because of the way that the Python standard library does datetime arithmetic:

(20 October 2013 12:00:00 EDT) + (31 days) = 20 November 2013 12:00:00 EDT

...which is technically true, but useless from a normal cultural standpoint, because 20 November 2013 is EST, not EDT. Reapplication of the general time zone information (e.g. "really, use Eastern time") is necessary.