Color.Lerp works strange

I want to make sunset effect, so my dir.light should change color from yellow to red. well here is a code:

    function dayTime(){
		if(transform.localRotation.eulerAngles.y < 237){
			isDay = true;
		}
		if(transform.localRotation.eulerAngles.y < 57){
			isDay = false;	
			}
		if(isDay){
			sun.color = Color.Lerp(dawnLight,dayLight,Time.time/4);
			if(sun.intensity<0.6){
				sun.intensity += 0.001;
				moon01.intensity -= 0.001;
				}
		
			}else{
				sun.color = Color.Lerp(dayLight,dawnLight,Time.deltaTime/4);
				if(sun.intensity>0.0){
				sun.intensity -= 0.001;
				moon01.intensity += 0.001;
				}
			}    			
		} 	

function Update(){
	
	if(squadScript.go){
	transform.Rotate(Vector3.up * Time.deltaTime*10);
	dayTime();
	}
}

Well issue is that, “Color.Lerp” worked only once during run.

Check this line:

sun.color = Color.Lerp(dawnLight,dayLight,Time.time/4);

Shouldn’t it be:

sun.color = Color.Lerp(dawnLight,dayLight,Time.deltaTime/4);

void ColorLerp(int starHour, int endHour, Color fromC, Color toC, int minsOfHour)
{
int hourLen = endHour - starHour;
int maxMin = hourLen * minsOfHour;
float lerpDeg = (float)(1f / maxMin);
int minNow = ((currHour - starHour) * minsOfHour) + currMin;
sun.light.color = Color.Lerp(fromC, toC, lerpDeg*minNow);
}

you need to use a float between 0 and 1 to gradiate between colors. time.deltaTime is usauallu 0.02 seconds, and you are dividing it by four.