-
-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
Describe the bug
icalendar should not generate UTC timezone information.
To reproduce
>>> from icalendar import Calendar, Event
>>> from datetime import datetime
>>> from zoneinfo import ZoneInfo
>>> event = Event.new(
... summary="Meeting in Zurich",
... start=datetime(2022, 1, 1, 12, 0, 0, tzinfo=ZoneInfo("Europe/Zurich")),
... end=datetime(2022, 1, 1, 13, 0, 0, tzinfo=ZoneInfo("Europe/Zurich")),
... location="Zurich, Switzerland",
... )
>>> calendar = Calendar.new(
... subcomponents=[event],
... )
>>> calendar.add_missing_timezones()
>>> calendar.timezones[0].tz_name
"UTC"
>>> calendar.timezones[1].tz_name
'Europe/Zurich'Expected behavior
UTC should not be generated.
Environment
- Operating system: Xubuntu 24
- Python version: 3.14
-
icalendarversion:main@52b5142a160b94b411ad42183f2396daae2f0bc0 7.0.0a4.dev441
Additional context
- I tested it with the latest version. For example, I used the command
pip3 install --upgrade https://github.com/collective/icalendar.git. - I attached the
.icssample file, or there is no.icssample file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels