File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,11 +71,6 @@ def _start_to_dtstart(
7171
7272 dt_naive = datetime .strptime (start_str [:19 ], "%Y-%m-%dT%H:%M:%S" )
7373
74- if time_zone :
75-
76- def _add_dtstart_tzid_passthrough ():
77- dtstart = icalendar .vDatetime (dt_naive )
78- dtstart .params ["TZID" ] = time_zone
7974 if time_zone :
8075 try :
8176 tz = ZoneInfo (time_zone )
@@ -87,18 +82,6 @@ def _add_dtstart_tzid_passthrough():
8782 dtstart = icalendar .vDatetime (dt_naive )
8883 dtstart .params ["TZID" ] = time_zone
8984 component .add ("dtstart" , dtstart )
90-
91- try :
92- import pytz # type: ignore[import]
93-
94- try :
95- tz = pytz .timezone (time_zone )
96- dt = tz .localize (dt_naive )
97- component .add ("dtstart" , dt )
98- except pytz .exceptions .UnknownTimeZoneError :
99- _add_dtstart_tzid_passthrough ()
100- except ImportError :
101- _add_dtstart_tzid_passthrough ()
10285 else :
10386 component .add ("dtstart" , dt_naive )
10487
You can’t perform that action at this time.
0 commit comments