Time of day script not working

I made a script that makes the time of day change gradually at a certain speed, but I can’t get the sky color to change the right way. The variable “sky” in this script is the same material that the skybox is. The color of the sky is supposed to gradually change color and not change immediately. This is the script:

var speed : float = 0.5; 
var stars : GameObject;
var day = Color(.302, .404, .808, 1);
var night = Color.black;
private var sunset : boolean;
var mid = Color.red;
var sky : Material;
var curSky : Color;
var smooth : float;
 
function Update() {
    transform.Rotate(speed*Time.deltaTime,0,0);
    if(transform.rotation.eulerAngles.x < 30){
    	if(sunset == true){
    		curSky = Color.Lerp(day, mid,  Time.deltaTime * smooth);
    	}
    	if(sunset == false){
    		curSky = Color.Lerp(night, mid,  Time.deltaTime * smooth);
    	}
    }
    if(transform.rotation.eulerAngles.x > 30){
    	if(transform.rotation.eulerAngles.x < 90){
    		sunset = true;
    		curSky = Color.Lerp(mid, day,  Time.deltaTime * smooth);
    	}
    }
    if(transform.rotation.eulerAngles.x > 90){
    	sunset = false;
    	curSky = Color.Lerp(mid, night,  Time.deltaTime * smooth);
    }
    sky.color = curSky;
}

Think you are misunderstand how lerp works.

Time.deltaTime * smooth will be roughly the same value each frame.

Color.Lerp(Black, White, 0) // will return black
Color.Lerp(Black, White, 1) // will return white
Color.Lerp(Black, White, 0.5) // will return gray

So you should include Time.time somewhere in yourscript

using UnityEngine;
using System.Collections;

public class TimeOfDay : MonoBehaviour {

     //This is just using the default sky-box only if the sky-box is set to procedural
public float time = 0.5f;

void Update () {
	this.transform.Rotate (Vector3.right * time * Time.smoothDeltaTime);
}

}