Determining thermostat on time