title: Check local time in if-statement
body: <p>I managed to get the local time, but now I want to use it in an if statement like this:</p>
  
  <pre><code>  Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT+1:00"));
    Date currentLocalTime = cal.getTime();
    DateFormat date = new SimpleDateFormat("HH:mm");
    // you can get seconds by adding  "...:ss" to it
    date.setTimeZone(TimeZone.getTimeZone("GMT+1:00"));
    String localTime = date.format(currentLocalTime);
  
    Log.w(localTime, "1");
  
    if (localTime == "12:11") {
       Log.w("Yes", "this is");
    }
    else {
       Log.w("jhlgsaljfd", "kajfhsd");
    }
  </code></pre>
  
  <p>However, this is not working, how to check the local time in the if-else statement?</p>