Sort notifications by time