The program structure looks good; but, a little bit clumsy! Why don't you follow the principle of 'Modular Programming?' There are many things in your program which are not consistent. For example: you are comparing with integer type temperatures; why have you declared it as float temp? there is no DPin definition for RELAY. If you are using DallasTemperatures Library, is there any need to key the address of the DS118B20 device? You should first document the meanings of the available methods of the Dallas Library before you use them in your program.
I tested mine one and that was working except the time zone. I suspect that your program will work; anyway, give a try!
It is always good practice to begin with a program that works! And then, you add/subtract ideas with the working program!
One of the features of Modular Programming is its clean main line program (ML) which contains minimum number of instructions; the required jobs are performed using subroutines. In your current project, you have the following jobs to do; which you are required to encompass within modular structure.
1. Global variable declarations.
2. Initialization
3. Time Acquisition and Display on LCD
4. Temperature Acquisition and Display on LCD
5. Select Time Zone (08:00:00 (080000) -- 20:00:00(200000)) and make heater ON/OFF to comply with this requirement: >=10 Temp <= 30.
6. Select Time Zone (20:00:00(200000) -- 08:00:00(080000)) and make heater ON/OFF to comply with this requirement: >=20 Temp <= 30.