Backport PR #32152 on branch 1.0.x (TST: add test for get_loc on tz-aware DatetimeIndex)
xref #32152

@jbrockmendel with tests moving around, is this OK for the backport. i.e. in the same place as on master.