At the moment the relay turns on at every reading it takes, which is right now at an alarming rate. That is the timing part I was talking about... Maybe the wrong function is used?
You were pointed in the right direction but have not followed up.
I also think that you have the 'else if' in the wrong place (both for the dht reading and the relay control). Currently the 'else if' is not the alternative for 'if(startTime == 0)'.
It will help to use auto format under tools or (ctrl +t) to organize your code and track the opening and closing brackets {}. The ide will highlight both brackets in a pair if you position the cursor after the bracket.
The "else if" applies to the "if" directly preceding it in the code.
Try to organize your code, follow the brackets, apply sterretje's suggestions , and post your latest.