Propagate name in more cases when using `to_datetime`
Closes #21697

Haven't ran tests yet
https://github.com/pandas-dev/pandas/pull/21703 is also proposed for this issue, though its currently failing. So happy to have you add tests. I was trying to stick to the convention in the file, but wanted is there a reason for local imports? Is that the convention in the codebase or is it OK to float the imports to the top?

```
def my_function():
  from pandas import Index
  return Index(tz_results, name=name)
``` # [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=h1) Report
> Merging [#21848](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1dd05ccf56b163dc51786e4f5ce76b279cc0dec3?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/21848/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #21848      +/-   ##
==========================================
+ Coverage   91.92%   91.92%   +<.01%     
==========================================
  Files         160      160              
  Lines       49916    49917       +1     
==========================================
+ Hits        45885    45886       +1     
  Misses       4031     4031
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <100%> (ø)` | :arrow_up: |
| #single | `42.11% <30%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/21848/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `85.26% <100%> (+0.04%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=footer). Last update [1dd05cc...944e2e5](https://codecov.io/gh/pandas-dev/pandas/pull/21848?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 @eyurtsev you should not use local imports except in very specific circumstances closing as stale. would still take this PR if updated.