• [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pandas.

  • [ ] (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

import pandas
from pandas.tseries.frequencies import to_offset
pandas.Timestamp('2000-01-10 10:00') + to_offset('BH') * 0

Problem description

This appears to be a regression in behavior as pandas 0.23.4 did not experience this behavior. I do not know exactly when this was introduced, but the result is Timestamp('2000-01-11 09:00'), which is unexpected and incorrect functionality. Additionally, this behavior does not repro for hourly data, for instance: pandas.Timestamp('2000-01-10 10:00') + to_offset('H') * 0

Expected Output

Timestamp('2000-01-10 10:00')

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit : None python : 3.6.10.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None pandas : 1.0.3 numpy : 1.18.2 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 46.1.3.post20200330 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : None IPython : None pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : None pyxlsb : None s3fs : None scipy : 1.4.1 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None

Comment From: mroeschke

This looks to be fixed in main (and I believe we have tests for this now) so closing