title: Workaround for Pandas FutureWarning when sorting a DateTimeIndex
body: <p>As described <a href="https://stackoverflow.com/questions/54681449/futurewarning-converting-timezone-aware-datetimearray-to-timezone-naive-ndarray">here</a>, Pandas.sort_index() sometimes emits a FutureWarning when doing a sort on a DateTimeIndex.  That question isn't actionable, since it contains no MCVE.  Here's one:</p>
  
  <pre><code>import pandas as pd
  idx = pd.DatetimeIndex(['2017-07-05 07:00:00', '2018-07-05 07:15:00','2017-07-05 07:30:00'])
  df = pd.DataFrame({'C1':['a','b','c']},index=idx)
  df = df.tz_localize('UTC')
  df.sort_index()
  </code></pre>
  
  <p>The warning looks like:</p>
  
  <blockquote>
    <p>FutureWarning: Converting timezone-aware DatetimeArray to
    timezone-naive ndarray with 'datetime64[ns]' dtype</p>
  </blockquote>
  
  <p>The stack (Pandas 0.24.1) is:</p>
  
  <pre><code>__array__, datetimes.py:358
  asanyarray, numeric.py:544
  nargsort, sorting.py:257
  sort_index, frame.py:4795
  </code></pre>
  
  <p>The error is emitted from datetimes.py, requesting that it be called with a dtype argument.  However, there's no way to force that all the way up through nargsort -- it looks like obeying datetimes.py's request would require changes to both pandas and numpy.</p>
  
  <p>Reported <a href="https://github.com/pandas-dev/pandas/issues/25439" rel="nofollow noreferrer">here</a>.  In the meantime, can you think of a workaround that I've missed?</p>