sort the columns by time.