Earth to be hottest in millennia: study