How to Permenantly Change a Variable in Update()

I’ve hit a roadblock in my project. When my character is sleepy (ie. has 300 sleep points out of 1000) and goes to sleep the time goes forward like I want. However, when the character gets sleepy again after that and goes to sleep, instead of adding the hours to the NEW time since his first sleep, the last sleep’s hours are taken off and the new sleep time’s hours are added.

So my question is how can I make gameTimeHour permenantly change in Update()?

public class Clock : MonoBehaviour {
Text text;
DateTime currentTime;
Sleep sleep;

// Use this for initialization
void Start () {
    text = FindObjectOfType<Text>();
    sleep = FindObjectOfType<Sleep>();
}

// Update is called once per frame
void Update ()
{
    numTimesGettingASkill = skills.numSkillTimes;
    currentTime = DateTime.Now;
    int gameTimeHour = currentTime.Hour;
    int gameTimeMinutes = currentTime.Minute;
    int gameTimeSeconds = currentTime.Second;

    if (sleep.goingToSleep == true)
    {
        if(sleep.hoursNeededToSleep >= 1)
        {
            gameTimeHour += Mathf.RoundToInt(sleep.hoursNeededToSleep);
        }
        else if (sleep.hoursNeededToSleep < 1 && sleep.hoursNeededToSleep > 0)
        {
            gameTimeHour += 1;
        }
        else
        {
            return;
        }
    }

    text.text = gameTimeHour + ":" + gameTimeMinutes + ":" + gameTimeSeconds;
}

}

Well you’re using DateTime.Now as your currentTime,
Which you will effectively need to play one hour for it to even go up by an hour which makes sense.

What you need to do is
put currentTime = DateTime.Now; into Start method and update it by yourself in the Update() method.
You will need to write your own logic when to add to seconds, minutes and hours.

Try this:

    public class Clock : MonoBehaviour
    {
        Text text;
        private DateTime currentTime;
        Sleep sleep;
        private float time;

        // Use this for initialization
        void Start()
        {
            text = FindObjectOfType<Text>();
            sleep = FindObjectOfType<Sleep>();
            currentTime = DateTime.Now;
        }

        // Update is called once per frame
        void Update()
        {
            // Do time calculation first
            time += Time.deltaTime;
            if (time >= 1f)
            {
                currentTime = currentTime.AddSeconds(1);
                time = 0f;
            }

            numTimesGettingASkill = skills.numSkillTimes;
            if (sleep.goingToSleep == true)
            {
                if (sleep.hoursNeededToSleep >= 1)
                {
                    currentTime = currentTime.AddHours(Mathf.RoundToInt(sleep.hoursNeededToSleep));
                }
                else if (sleep.hoursNeededToSleep < 1 && sleep.hoursNeededToSleep > 0)
                {
                    currentTime = currentTime.AddHours(1);
                }
                else
                {
                    return;
                }
            }
            text.text = currentTime.Hour + ":" + currentTime.Minute + ":" + currentTime.Second;
        }
    }