diff options
author | emkael <emkael@tlen.pl> | 2016-02-29 16:16:56 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-02-29 16:16:56 +0100 |
commit | cce65143b63b3c1c5ab1e7407ceeb15fba96e6ee (patch) | |
tree | 079e17e480877d8c7f3421644ef657550427b4d8 | |
parent | 22c9ae1a764699dcd16978580f25f7b3da539934 (diff) |
* bugfix for calendar entry modification date
-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: |