Convert Date & Time with SimpleDateFormat from one TimeZone to another TimeZone
<p>I have a string with a "bad" formatted date &amp; time which I need to convert to a <code>Date</code> object so I can format it's contents using the <code>SimpleDateFormat</code> and the current <code>Locale</code>.</p>

<p>However, no matter how I try, I can never get the ouput to show the correct time, I convert from a PST time (UTC-8) to GMT, but the printed hour is +1 hour too much, GMT is only +7 from the (currently PDT) timezone.</p>

<p>I've tried the code on two Android devices, one set to GMT and one set to CET, one Android emulator, and running from command-line, all of them get the hour wrong. (+1)</p>

<p><strong>What am I doing wrong in my code below?</strong></p>

<pre><code>    String sourceSDFformatter = "MMM d, h:mm a Z";
    String destSDFformatter = "EEEEE, MMMMM dd, HH:mm";
    String dateString = "Mar 20th, 10:00 AM PST".replaceAll("st|nd|rd|th", "");

    SimpleDateFormat sourceSDF = new SimpleDateFormat(sourceSDFformatter, Locale.US);
    SimpleDateFormat destSDF = new SimpleDateFormat(destSDFformatter, Locale.UK);

    TimeZone sourceTZ = TimeZone.getTimeZone("America/Los_Angeles");
    TimeZone destTZ = TimeZone.getTimeZone("GMT");

    sourceSDF.setTimeZone(sourceTZ);
    destSDF.setTimeZone(destTZ);

    Date myDate = sourceSDF.parse(dateString);
    myDate.setYear(new Date().getYear());

    System.out.println("Your Time: " + destSDF.format(myDate));
</code></pre>

<p>Outputs:</p>

<p><code>Your Time: Wednesday, March 20, 18:00</code></p>

<p>When my <strong>expected</strong> output would be: <code>Your Time: Wednesday, March 20, 17:00</code>.</p>

<p>I've tried the SO answer in <a href="http://stackoverflow.com/a/2414904" title="Conversion of local time zone to GMT in java">Conversion of local time zone to GMT in java</a> and it works perfectly if I change <code>TimeZone.getTimeZone("America/Los_Angeles")</code>, then the printed hour is +7 hours ahead which is correct.</p>
