Skip to content

Commit

Permalink
fix: replace tzinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Dec 9, 2024
1 parent 716923f commit 56cbfbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mail_client/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def add_or_update_tzinfo(date_time: datetime | str, timezone: str | None = None)
target_tz = ZoneInfo(timezone or get_system_timezone())

if date_time.tzinfo is None:
date_time = target_tz.localize(date_time)
date_time = date_time.replace(tzinfo=target_tz)
else:
date_time = date_time.astimezone(target_tz)

Expand Down

0 comments on commit 56cbfbf

Please sign in to comment.