[0.24.x] failed on setting DatetimeIndex with mixed datetime data
#### Code Sample, a copy-pastable example if possible

```python
# Your code here
import pandas as pd
df = pd.DataFrame({'time': ['2013-12-01 08:00:00', '2013-12-01 08:30:00', '2013-12-01 09:00:00', '2014-05-01 09:00:00-07:00', '2014-05-01 09:30:00-07:00', '2014-05-01 10:00:00-07:00'], 'current': [208.0, 482.0, 774.0, 263.0, 538.5, 822.5], 'total': [67.5, 250.5, 573.5, 173.0, 377.0, 735.0]})
df['time'] = pd.to_datetime(df.time)
df = df.set_index('time')
type(df.index)
```
#### Problem description
Got the output:  type(df.index) = <class 'pandas.core.indexes.base.Index'>
If 'time' is filled with all same type of data such as '2013-12-01 08:00:00' or all same type of data like 
'2014-05-01 10:00:00-07:00', then the output is 
<class 'pandas.core.indexes.datetimes.DatetimeIndex'>
Same result on 0.24.0
But worked for versions <= 0.23.x

#### Expected Output
type(df.index) = <class 'pandas.core.indexes.datetimes.DatetimeIndex'>
#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 37 Stepping 5, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: Chinese (Traditional)_Taiwan.950

pandas: 0.24.1
pytest: None
pip: 19.0.2
setuptools: 40.8.0
Cython: None
numpy: 1.16.1
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
