title: TimeZone issue in Java XMLGregorianCalendar
body: <p>I hope this is not a repeat.
  I checked other searches here and all of them seem to talk about "displaying" the date in the right TimeZone format using SimpleDateFormat.</p>
  
  <p>However, my problem is I obtain an XMLGregorianCalendar Object which is let us say in "CET".</p>
  
  <p>I have to find out the format from this object and send the current time also in the same TimeZone as the server.</p>
  
  <p>For eg: I need an XMLGregorianCalendar Object that returns me in this format(with Timezone):</p>
  
  <p>2012-09-19T15:23:36.421+02:00</p>
  
  <p>So I just tried this following snippet which seems to only return the time in local Timezone :(</p>
  
  <pre><code>TimeZone utc = TimeZone.getTimeZone("CET");
  GregorianCalendar gc = new GregorianCalendar();
  DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
  df.setTimeZone(utc);
  System.out.println(" - Gregorian UTC [" + df.format(gc.getTime()) + "]")
  
  XMLGregorianCalendar currServTime = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);
  
  System.out.println("currServTime is "+currServTime);
  </code></pre>