title: How to get GMT date from Unix epoch time milliseconds?
body: <p>I trying convert unix milliseconds to gmt date, I need only hours and minutes, but results are incorrect according to online converters.</p>
  
  <p>What I need</p>
  
  <p><a href="https://i.stack.imgur.com/vPHd8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vPHd8.jpg" alt="enter image description here"></a></p>
  
  <p>Here is my code:</p>
  
  <pre><code> public static void main(String[] args) {
      long time = 1438050023;
     // TimeZone timeZone = TimeZone.getTimeZone("UTC");
      Calendar calendar = Calendar.getInstance();
  
      calendar.setTimeInMillis(time / 1000);
  
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm:ss dd MM yyyy");
      simpleDateFormat.setTimeZone(calendar.getTimeZone());
  
      System.out.println(simpleDateFormat.format(calendar.getTime()));
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>03:23:58 01 01 1970
  </code></pre>