Parsing Java String into GMT Date
<p>I'm trying to parse a String that represents a date using GMT, but it prints out in my timezone on my PC (pacific).  When I run the below I get the below output.  Any ideas on how to get the parse to parse and return a GMT date?  If you look below I'm setting the timezone using  format.setTimeZone(TimeZone.getTimeZone("GMT")); but its not producing the desired result. </p>

<p>output from below code:</p>

<p><strong>Mon Oct 29 05:57:00 PDT 2012</strong></p>

<pre><code> package javaapplication1;

    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.TimeZone;


    public class JavaApplication1 {

        public static void main(String[] args) throws ParseException {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
            format.setTimeZone(TimeZone.getTimeZone("GMT"));
            System.out.println(format.parse("2012-10-29T12:57:00-0000"));
        }
    }
</code></pre>
