title: Difference between two dates and TimeZone
body: <pre><code>String s1 = "00:00:00.221";
  String s2 = "00:00:44.221";
  
  Calendar c1 = Calendar.getInstance();
  Calendar c2 = Calendar.getInstance();
  Calendar c3 = Calendar.getInstance();
  
  SimpleDateFormat myformat= new SimpleDateFormat("HH:mm:ss.SSS");
  
  c1.setTime(myformat.parse(s1));
  c2.setTime(myformat.parse(s2));
  
  long mills= c2.getTimeInMillis() - c1.getTimeInMillis();
  
  c3.setTimeInMillis(mills);
  
  String g1 = String.valueOf(c3.get(Calendar.HOUR));
  String g2 = String.valueOf(c3.get(Calendar.MINUTE));
  String g3 = String.valueOf(c3.get(Calendar.SECOND));
  String g4 = String.valueOf(c3.get(Calendar.MILLISECOND));
  String res = g1 + ":" + g2 + ":" + g3 + "."+g4;
  </code></pre>
  
  <p>i expect <strong>res = "00:00:44.000"</strong>
  but <strong>res = "03:00:44.000"</strong></p>
  
  <p>Why <strong>g1</strong> is <strong>3</strong> hour? </p>
  
  <p>I think its TimeZone. But why? How to do it right?</p>