DAViCal/davical — pull request #12 by althaus (2013-09-11 10:49:18+00:00)
Title: Fixed fetching new external resources on BIND

There is a bug when you add a new external bind and the modification time of the file is older than "now".

In `create_external()` the new `collection` is added with `modified` set to `current_timestamp`. In `fetch_external()` this value is compared with the `last_modified` and `filetime` of the resource. So if it's older than our "now", the file will never be fetched.

I fixed this by leaving `modified` empty on creation and check this on fetching. If it's not set, the script will enforce a fetch from the new resource. I also fixed a minor bug in the case that `filetime` can be `-1` if value is "unkown".