Skip to content

Commit

Permalink
Fix end-date-only TZ logic in holidays.py
Browse files Browse the repository at this point in the history
  • Loading branch information
herebebeasties committed Feb 12, 2024
1 parent a33afb5 commit 5ed14e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exchange_calendars/pandas_extensions/holiday.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def __init__(
assert self.tz == self.start_date.tz
if self.end_date is not None:
if self.tz is None and self.end_date.tz is not None:
self.tz = start_date.tz
self.tz = end_date.tz
if self.end_date.tz is None and self.tz is not None:
self.end_date = self.end_date.tz_localize(self.tz)
assert self.tz == self.end_date.tz
if self.start_date is not None and self.end_date is not None:
self.start_date.tz == self.end_date.tz
assert self.start_date.tz == self.end_date.tz

def __repr__(self) -> str:
info = ""
Expand Down

0 comments on commit 5ed14e5

Please sign in to comment.