diff --git a/combo_plugin_gnm/templatetags/gnm.py b/combo_plugin_gnm/templatetags/gnm.py index 7eb8b9f..def4283 100644 --- a/combo_plugin_gnm/templatetags/gnm.py +++ b/combo_plugin_gnm/templatetags/gnm.py @@ -238,14 +238,14 @@ def get_slots_from_mairie_format(data, base_datetime): def parse_valid_from(spec): valid_from = parse_datetime(spec.get('validFrom')) or parse_date(spec.get('validFrom')) if not isinstance(valid_from, datetime.datetime): - valid_from = datetime.datetime(valid_from.year, valid_from.month, valid_from.day) + valid_from = make_aware(datetime.datetime(valid_from.year, valid_from.month, valid_from.day)) return valid_from def parse_valid_through(spec): valid_through = parse_datetime(spec.get('validThrough')) or parse_date(spec.get('validThrough')) if not isinstance(valid_through, datetime.datetime): - valid_through = datetime.datetime(valid_through.year, valid_through.month, valid_through.day, 23, 59) + valid_through = make_aware(datetime.datetime(valid_through.year, valid_through.month, valid_through.day, 23, 59)) return valid_through