Sort time series data before sending it down