Skip to content

Commit

Permalink
Force usage of pytz
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
iamleot committed Oct 31, 2024
1 parent 106e4d0 commit 5a26733
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions khal/icalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a26733

Please sign in to comment.