fabriceb/GCalCron2 — pull request #7 by ndbroadbent (2012-01-08 16:11:39+00:00)
Title: start_time format for all-day events doesn't include time, so iso_to_datetime() crashes

start_time format for all-day events is '%Y-%m-%d', not '%Y-%m-%dT%H:%M'.

I replaced the `iso_to_datetime()` method with `dateutil.parser.parse()`, which handles both formats seamlessly and defaults the time for all-day events to '00:00'

Here is the error from the crash:

```
Submitting query
Query results received
Traceback (most recent call last):
File "/home/ndbroadbent/src/python/GCalCron2/gcalcron2.py", line 296, in
g.sync_gcal_to_cron()
File "/home/ndbroadbent/src/python/GCalCron2/gcalcron2.py", line 226, in sync_gcal_to_cron
(events, last_sync) = gcal_adapter.get_events(last_sync, num_days)
File "/home/ndbroadbent/src/python/GCalCron2/gcalcron2.py", line 122, in get_events
event_time = utc_to_local(iso_to_datetime(event.when[0].start_time))
File "/home/ndbroadbent/src/python/GCalCron2/gcalcron2.py", line 276, in iso_to_datetime
return datetime.datetime.strptime(iso[:16], '%Y-%m-%dT%H:%M')
File "/usr/lib/python2.6/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2012-01-11' does not match format '%Y-%m-%dT%H:%M'
```