Added regression test for bug fix of datetimeindex cast (#41436) 
Added regression test for bug fix of datetimeindex cast (#41436) 

Co-authored-by: ShaharNaveh <>
jorisvandenbossche/pandas,dsm054/pandas,gfyoung/pandas,pandas-dev/pandas,datapythonista/pandas,dsm054/pandas,gfyoung/pandas,rs2/pandas,rs2/pandas,jorisvandenbossche/pandas,gfyoung/pandas,jorisvandenbossche/pandas,jorisvandenbossche/pandas,gfyoung/pandas,rs2/pandas,datapythonista/pandas,pandas-dev/pandas,datapythonista/pandas,dsm054/pandas,pandas-dev/pandas,dsm054/pandas,dsm054/pandas,pandas-dev/pandas,gfyoung/pandas,rs2/pandas,datapythonista/pandas