Skip to content

Commit

Permalink
fixed an issue with incorrectly using a module to initialize a zone i…
Browse files Browse the repository at this point in the history
…nfo value
  • Loading branch information
pjkaufman committed Nov 3, 2021
1 parent 2f093b5 commit 969d27e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions khal/icalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ def sanitize_datetime(date):
rrule._until = dt.datetime(2037, 12, 31)
else:
if events_tz and 'Z' in rrule_param.to_ical().decode():
rrule._until = rrule._until.replace(tzinfo=ZoneInfo("UTC")).astimezone(
events_tz).replace(tzinfo=None)
rrule._until = rrule._until.replace(tzinfo=ZoneInfo("UTC")).astimezone(events_tz).replace(tzinfo=None)

# rrule._until and dtstart could be dt.date or dt.datetime. They
# need to be the same for comparison
Expand Down
2 changes: 1 addition & 1 deletion khal/parse_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def rrulefstr(repeat, until, locale, timezone):
if timezone:
rrule_settings['until'] = until_dt.\
replace(tzinfo=timezone).\
astimezone(ZoneInfo("UTC"))
astimezone(ZoneInfo.ZoneInfo("UTC"))
else:
rrule_settings['until'] = until_dt
return rrule_settings
Expand Down

0 comments on commit 969d27e

Please sign in to comment.