Sort messages by creation time.