diff options
-rw-r--r-- | bin/fetch_cals.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/fetch_cals.py b/bin/fetch_cals.py index 13c4eca..59dc0b7 100644 --- a/bin/fetch_cals.py +++ b/bin/fetch_cals.py @@ -2,6 +2,7 @@ import datetime import dateutil.parser as dateparser import ics +import pytz import requests from rcal.db import Session from rcal.model import Calendar, Entry @@ -59,7 +60,7 @@ def fetch_calendar(calendar, session): modified_date = get_last_modification_time(event['ics']) if not modified_date or \ not calendar.last_updated or \ - modified_date.time() > calendar.last_updated.time(): + modified_date > calendar.last_updated.replace(tzinfo=pytz.UTC): print 'Updating event %s' % event['db'].uid update_event(event['db'], event['ics']) for event in new_events: |