title: Need XMLGregorianCalendar in specific time format| Java
body: <pre><code>public static XMLGregorianCalendar getXMLEventTime(ZonedDateTime zonedDateTime) {
          XMLGregorianCalendar xmlGregorianCalendar = null;
  
              if(zonedDateTime!=null) {
  
                  GregorianCalendar gregorianCalendar = new GregorianCalendar(); 
                  gregorianCalendar.setTime(getDateFromZonedDateTime(zonedDateTime));
                  xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar);
              }
  
  
          return xmlGregorianCalendar;
      }
  </code></pre>
  
  <p>I want to the output in "2020-05-06T16:58:38.517+00:00" format but got this "2020-05-06T16:58:38.517Z" as my server in in UTC. </p>
  
  <p>When I run the application in my local (IST timeZone) I got the correct output "2020-05-06T16:58:38.517+05:30" but same not working in UTC timeZone</p>