Skip to content

Commit

Permalink
💨 Refactor timezone handling in PlotlyAggregatorParser
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasvdd committed Oct 23, 2024
1 parent 1f88adb commit b31dce7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plotly_resampler/aggregation/plotly_aggregator_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def to_same_tz(
assert ts.tz.__str__() == reference_tz.__str__()
except AssertionError:
assert ts.utcoffset() == reference_tz.utcoffset(ts.tz_convert(None))
return ts
else: # localize -> time remains the same
return ts.tz_localize(reference_tz)
elif reference_tz is None and ts.tz is not None:
Expand Down

0 comments on commit b31dce7

Please sign in to comment.