Revert "Revert "sort by time""

This reverts commit 1e1cc84c421c060195e1ca10eca458ea7db038a6.