TST: Set timeoffset as the window parameter
- [X] closes #28266
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`


Hi guys, just added tests for issue #28266. I'm participating in the Hacktoberfest event and would much appreciate it if someone put the label ‘hacktoberfest-accepted’  on this PR. Any modification needed just hit me up :)
