Skip to content

Commit 317e1e7

Browse files
committed
fix simple_new args
1 parent 7e951e4 commit 317e1e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tseries/offsets.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ def apply_index(self, i):
921921
shifted = liboffsets.shift_months(i.asi8, self.n, self._day_opt)
922922
# TODO: going through __new__ raises on call to _validate_frequency;
923923
# are we passing incorrect freq?
924-
return type(i)._simple_new(shifted, freq=i.freq, dtype=i.dtype)
924+
return type(i)._simple_new(shifted, freq=i.freq, tz=i.tz)
925925

926926

927927
class MonthEnd(MonthOffset):
@@ -1604,7 +1604,7 @@ def apply_index(self, dtindex):
16041604
# TODO: going through __new__ raises on call to _validate_frequency;
16051605
# are we passing incorrect freq?
16061606
return type(dtindex)._simple_new(shifted, freq=dtindex.freq,
1607-
dtype=dtindex.dtype)
1607+
tz=dtindex.tz)
16081608

16091609

16101610
class BQuarterEnd(QuarterOffset):
@@ -1678,7 +1678,7 @@ def apply_index(self, dtindex):
16781678
# TODO: going through __new__ raises on call to _validate_frequency;
16791679
# are we passing incorrect freq?
16801680
return type(dtindex)._simple_new(shifted, freq=dtindex.freq,
1681-
dtype=dtindex.dtype)
1681+
tz=dtindex.tz)
16821682

16831683
def onOffset(self, dt):
16841684
if self.normalize and not _is_normalized(dt):

0 commit comments

Comments
 (0)