title: Generating UTC Time in java
body: <p>I want to get the UTC time for 01/01/2100 in Java to '2100-01-01 00:00:00'. I am getting "2100-01-01 00:08:00". Any idea, how to correct this.</p>
  
  <pre><code>public Date getFinalTime() {
      Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
  
      DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
      Date finalTime = null;
  
      try
      {
          finalTime = df.parse("01/01/2100");            
      } catch (ParseException e)
      {
          e.printStackTrace();
      }
  
      calendar.setTime(finalTime);
      return calendar.getTime();
  }
  </code></pre>