STYLE: fix pylint redefined-outer-name warning for file
Associated with [#49656](https://github.com/pandas-dev/pandas/issues/49656).
Fixes pylint warnings for `redefined-outer-name` on the following files:

`pandas/core/tools/datetimes.py`



- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

no need to keep updating the branch - this is probably fine, let's let the checks run and I'll merge later You are welcome! Thank you for the opportunity to contribute! 