# Buggy code
def _upsample(self, method, limit=None, fill_value=None):
    """
    Parameters
    ----------
    method : string {'backfill', 'bfill', 'pad',
        'ffill', 'asfreq'} method for upsampling
    limit : int, default None
        Maximum size gap to fill when reindexing
    fill_value : scalar, default None
        Value to use for missing values

    See Also
    --------
    .fillna

    """
    self._set_binner()
    if self.axis:
        raise AssertionError("axis must be 0")
    if self._from_selection:
        raise ValueError(
            "Upsampling from level= or on= selection "
            "is not supported, use .set_index(...) "
            "to explicitly set index to datetime-like"
        )

    ax = self.ax
    obj = self._selected_obj
    binner = self.binner
    res_index = self._adjust_binner_for_upsample(binner)

    # if we have the same frequency as our axis, then we are equal sampling
    if limit is None and to_offset(ax.inferred_freq) == self.freq:
        result = obj.copy()
        result.index = res_index
    else:
        result = obj.reindex(
            res_index, method=method, limit=limit, fill_value=fill_value
        )

    result = self._apply_loffset(result)
    return self._wrap_result(result)


# Traceback (ValueError)
import pandas as pd

# works as expected (note the daylight savings transitions in the head and tail)
pd.Series(1., pd.date_range('2020-03-28','2020-10-27', freq='D', tz="Europe/Amsterdam")).resample('24H').pad()

2020-03-28 00:00:00+01:00    1.0
2020-03-29 00:00:00+01:00    1.0
2020-03-30 01:00:00+02:00    1.0
2020-03-31 01:00:00+02:00    1.0
2020-04-01 01:00:00+02:00    1.0
...
2020-10-23 01:00:00+02:00    1.0
2020-10-24 01:00:00+02:00    1.0
2020-10-25 01:00:00+02:00    1.0
2020-10-26 00:00:00+01:00    1.0
2020-10-27 00:00:00+01:00    1.0
Freq: 24H, Length: 214, dtype: float64

# fails unexpectedly
pd.Series(1., pd.date_range('2020-03-28','2020-03-31', freq='D', tz="Europe/Amsterdam")).resample('24H').pad()

Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/felix/anaconda3/envs/bvp-venv/lib/python3.6/site-packages/pandas/core/resample.py", line 453, in pad
return self._upsample("pad", limit=limit)
File "/home/felix/anaconda3/envs/bvp-venv/lib/python3.6/site-packages/pandas/core/resample.py", line 1092, in _upsample
result.index = res_index
File "/home/felix/anaconda3/envs/bvp-venv/lib/python3.6/site-packages/pandas/core/generic.py", line 5287, in __setattr__
return object.__setattr__(self, name, value)
File "pandas/_libs/properties.pyx", line 67, in pandas._libs.properties.AxisProperty.__set__
File "/home/felix/anaconda3/envs/bvp-venv/lib/python3.6/site-packages/pandas/core/series.py", line 401, in _set_axis
self._data.set_axis(axis, labels)
File "/home/felix/anaconda3/envs/bvp-venv/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 178, in set_axis
f"Length mismatch: Expected axis has {old_len} elements, new "
ValueError: Length mismatch: Expected axis has 4 elements, new values have 3 elements

# Fixed code
def _upsample(self, method, limit=None, fill_value=None):
    """
    Parameters
    ----------
    method : string {'backfill', 'bfill', 'pad',
        'ffill', 'asfreq'} method for upsampling
    limit : int, default None
        Maximum size gap to fill when reindexing
    fill_value : scalar, default None
        Value to use for missing values

    See Also
    --------
    .fillna

    """
    self._set_binner()
    if self.axis:
        raise AssertionError("axis must be 0")
    if self._from_selection:
        raise ValueError(
            "Upsampling from level= or on= selection "
            "is not supported, use .set_index(...) "
            "to explicitly set index to datetime-like"
        )

    ax = self.ax
    obj = self._selected_obj
    binner = self.binner
    res_index = self._adjust_binner_for_upsample(binner)

    # if we have the same frequency as our axis, then we are equal sampling
    if (
        limit is None
        and to_offset(ax.inferred_freq) == self.freq
        and len(obj) == len(res_index)
    ):
        result = obj.copy()
        result.index = res_index
    else:
        result = obj.reindex(
            res_index, method=method, limit=limit, fill_value=fill_value
        )

    result = self._apply_loffset(result)
    return self._wrap_result(result)