From cce65143b63b3c1c5ab1e7407ceeb15fba96e6ee Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 29 Feb 2016 16:16:56 +0100 Subject: * bugfix for calendar entry modification date --- bin/fetch_cals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3