Excessive heat delays ripening. The plant protects itself against dropping its seed onto a dried out, over heated soil where most would die. I experienced this in 2018. During the heatwave I bought green tomatoes indoors and left them in the shade, after a few days they started to ripen. Now it’s September and the weather is cooler they should start to turn red.