Skip to content

Commit

Permalink
Use replace(tzinfo) to adopt the remind timezone
Browse files Browse the repository at this point in the history
The _localtz option should serve as an override, to add the timezone of
the Remind event, so replace() is correct. astimezone() instead would
shift the event date from the system timezone to _localtz.

Fixes a regression in 2c41e72.
  • Loading branch information
jspricke committed Sep 13, 2022
1 parent 12a82f0 commit 27bf488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remind.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _parse_remind(
if "eventstart" in entry:
dtstart: datetime | date = datetime.strptime(
entry["eventstart"], "%Y-%m-%dT%H:%M"
).astimezone(self._localtz)
).replace(tzinfo=self._localtz)
else:
dtstart = datetime.strptime(entry["date"], "%Y-%m-%d").date()

Expand Down

0 comments on commit 27bf488

Please sign in to comment.