title: Convert Date Time String from one timezone A to timezone B where jvm is running in timezone C
body: <p>I have a scenario where I need to convert a date time string from <strong>Timezone A(UTC)</strong> to <strong>Timezone B(EST)</strong>.</p>
  
  <p>Catch here is the JVM where this transformation is happening is <strong>Timezone C(HKT) Date Object</strong>.</p>
  
  <p>So the code block is as follows:</p>
  
  <pre><code>String dateString="20141114213000";
  dateString += " UTC";
  String formatString ="yyyyMMddHHmmss";
  SimpleDateFormat sdf = new SimpleDateFormat(formatString + " z");
  
   Date localDate = sdf.parse(dateString);
   System.out.println("Local Date::"+localDate); // Local Date::Sat Nov 15 05:30:00 HKT 2014
  
   Calendar localCal = Calendar.getInstance();
   localCal.setTime(localDate);
  
   TimeZone estTimeZone = TimeZone.getTimeZone("America/New_York");
  
   localCal.setTimeZone(estTimeZone);
   sdf.setTimeZone(estTimeZone);
  
   System.out.println(sdf.format(localCal.getTime()));//20141114163000 EST
  
   System.out.println(localCal.getTime());//Sat Nov 15 05:30:00 HKT 2014
  </code></pre>
  
  <p>The output I am expecting is to be "<strong>Fri Nov 14 16:30:00 EST 2014</strong>" from the last statement, i.e., the final date object available should be in <strong>EST</strong>. </p>
  
  <p>Please let know if anyone has info on this.</p>
  
  <hr>
  
  <p>Update:<br>
  Just to make my request clear, output should be in <strong>Date object</strong> only. </p>
  
  <p>The sample code and the output I printed is only for clearer explanation.</p>
  
  <p>So basically String "<strong>20141114213000</strong>" which is a <strong>UTC Date String</strong> needs to be converted to <strong>EST Date Object</strong> and JVM where this transformation is happening is in <strong>HKT</strong>.</p>