LocalDateTime variable stopped being live : <p>When I first ran my code (below) it printed out the live time (ignore the "LOL", that was for debugging purposes..), but I've been running it over and over for a while now while doing other stuff and I realized it wasn't printing the live time anymore, just the time it registered the first time I ran it.
Code:</p>

<pre class="lang-java prettyprint-override"><code> public static String classCheck(){
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:MM");  
        LocalDateTime now = LocalDateTime.now();  
        System.out.println(dtf.format(now)+"LOL");
        int currentTime = toMins(dtf.format(now));
        //Beging collecting preset class timings..
        String classOneBegin = "11:00", classTwoBegin = "12:30", classThreeBegin = "14:00", classFourBegin = "16:30", classFourEnd = "18:00";
        int classOneBeginX, classTwoBeginX, classThreeBeginX, classFourBeginX, classFourEndX;

        classOneBeginX = timeCheck.toMins(classOneBegin);
        classTwoBeginX = timeCheck.toMins(classTwoBegin);
        classThreeBeginX = timeCheck.toMins(classThreeBegin);
        classFourBeginX = timeCheck.toMins(classFourBegin);
        classFourEndX = timeCheck.toMins(classFourEnd);
        //...End. I feel confident that I could've found a faster, more inclusive solution to this, but time is of the essence..
        //Now to compare the time with each "cycle" and return an int that represent the current class. 
        if (currentTime &gt;= classOneBeginX &amp;&amp; currentTime &lt;= classTwoBeginX) {
            return "4";
        }else if(currentTime &gt;= classTwoBeginX &amp;&amp; currentTime &lt;= classThreeBeginX){
            return "1";
        }else if(currentTime &gt;= classThreeBeginX &amp;&amp; currentTime &lt;= classFourBeginX){
            return "2";
        }else if(currentTime &gt;= classFourBeginX &amp;&amp; currentTime &lt;= classFourEndX){
            return "3";
        }else return "0"; //Outside of class time ..

    }
</code></pre>

<p>I'm not sure where the issue is to be honest, the lines of code of focus here is lines 2~4</p>

<pre class="lang-java prettyprint-override"><code>DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:MM");  
LocalDateTime now = LocalDateTime.now();  
System.out.println(dtf.format(now)+"LOL");
</code></pre>

<p>It's stuck at 2:04, but it's currently 3:08 right now, I was expecting that each time I ran my code it'd print the live time (+"LOL"..)</p>
