From 5a2673391f85788cb992b3332c272ed76324dc5f Mon Sep 17 00:00:00 2001 From: Leonardo Taccari Date: Thu, 31 Oct 2024 13:14:08 +0100 Subject: [PATCH] Force usage of pytz For timezone functionalities icalendar can use both pytz and zoneinfo, preferring zoneinfo. We rely on pytz for several attributes, stick to it. Fixes #1361. Should obsolete #1363. --- khal/icalendar.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/khal/icalendar.py b/khal/icalendar.py index 39e6eda8f..3d1fcd71f 100644 --- a/khal/icalendar.py +++ b/khal/icalendar.py @@ -37,6 +37,10 @@ logger = logging.getLogger('khal') +# Force use of pytz because we rely on functionalities not available in +# zoneinfo. +icalendar.use_pytz() + def split_ics(ics: str, random_uid: bool=False, default_timezone=None) -> List: """split an ics string into several according to VEVENT's UIDs