Converting UTC time to a different time zone not working
<p>For some reason the conversion below does not happen and the CST date is the same the UTC. Any ideas?</p>

<pre><code>SimpleDateFormat sourceFormat = new SimpleDateFormat("yyyyMMddHHmm");
sourceFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date UtcValue = null;
try {
    UtcValue = sourceFormat.parse(201202011036);
} catch (ParseException e) {

e.printStackTrace();
}
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MM/yyyy hh:mmaa");
dateFormatter.setTimeZone(TimeZone.getTimeZone("CST"));
String dt = dateFormatter.format(UtcValue ));
</code></pre>

<p>Hello, I tried you example but it is not working. CST is hardcoded for testing. The workflow is I have a UTC timestamp and the timezone it is from. I need to show that in Non UTC time. The app can be in a different timezone so I can not use defaultTimeZone to format.</p>

<pre><code>String zone = "CST";
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
long when = 0;
        try {
            when = dateFormat.parse("201202021726").getTime();

        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        String localDateString = dateFormat.format(new Date(when + TimeZone.getTimeZone(zone).getRawOffset() + (TimeZone.getTimeZone(zone).inDaylightTime(new Date()) ? TimeZone.getTimeZone(zone).getDSTSavings() : 0)));
        Log.v("TimeZone Time",localDateString);
        SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MM/yyyy hh:mmaa");

        Log.v("New TimeZone Time",dateFormatter.format(new Date(when + TimeZone.getTimeZone(zone).getRawOffset() + (TimeZone.getTimeZone(zone).inDaylightTime(new Date()) ? TimeZone.getTimeZone(zone).getDSTSavings() : 0))));
</code></pre>
