title: Axis2 - Date Format
body: <h2>Scenario</h2>
  
  <p>The date format which is output as a response to the Web Service client  by Axis2 is formatted as "2009-08-28+01:00". I would like to change this to show only the date without the timezone information (e.g.:"2009-08-28")</p>
  
  <h2>Configuration</h2>
  
  <h3>Libraries</h3>
  
  <p>Axis 2 1.4.1</p>
  
  <h3>WSDL</h3>
  
  <pre><code>&lt;xsd:element name="StartDate" type="xsd:date" /&gt;;
  </code></pre>
  
  <h2>Question</h2>
  
  <ul>
  <li>Is it possible to change the output format, which is used by Axis 2 to write date information?</li>
  <li>Can you see any issues for .NET clients reagrding the conversion of this date format?</li>
  </ul>
  
  <h2>Constraints</h2>
  
  <p>Unfortunately it is not possible to change the "StartDate" element to a <code>xsd:string</code> or <code>xsd:token</code>
  <br />
  <br />
  <br /></p>
  
  <h2>Question refinement</h2>
  
  <p>As I am using the <code>xsd:date</code> XML Data Type which is defined as </p>
  
  <pre><code>[-]CCYY-MM-DD[Z|(+|-)hh:mm]
  </code></pre>
  
  <p>Thus if I set</p>
  
  <pre><code>Calendar cal = Calendar.getInstance();
  cal.setTimeZone(TimeZone.getTimeZone("UTC");
  ...
  </code></pre>
  
  <p>then the output looks like this</p>
  
  <pre><code>2009-01-28Z
  </code></pre>
  
  <p>You can replace "UTC" by "GMT" or "".</p>
  
  <p>Can I get rid of the "Z"?</p>