Sorting by Datetime

I have a data table with a list of events and would like to return the events in order with the newest at the top.

I’m querying like this:

shifts = app_tables.backup_table.search(tables.order_by('datetime', ascending=False))

But the rows returned aren’t in descending order - they’re in descending order by from the year to the minute, and ascending order for the second. In the screenshot row 1 (2025-05-09 08:51:03.205000-07:00) is the newest, but should be followed by row 6 (2025-05-09 08:41:26.660000-07:00) which is the 2nd newest.