title: gregorian calendar returns previous day date when toGregorianCalendar().getTime() is called
body: <p>Following is piece of code:</p>
  
  <pre><code>customerDetailsType.getDateOfBirth().toGregorianCalendar().getTime()
  </code></pre>
  
  <p>When I inspect the value of <code>customer.getDateOfBirth()</code> in eclipse debug mode, it shows me current date. </p>
  
  <p>When I inspect the value of <code>customerDetailsType.getDateOfBirth().toGregorianCalendar().getTime()</code>, it shows me previous day date.</p>
  
  <p>The return value of <code>customer.getDateOfBirth()</code> is of type: <strong>XMLGregorianCalendar</strong>.
  I am calling a webservice and passing Date object as dateOfBirth to server.
  The above code is on server.</p>
  
  <p>Definition of dateOfBirth is like :     </p>
  
  <pre><code>@XmlSchemaType(name = "date")
  
  protected XMLGregorianCalendar dateOfBirth;
  </code></pre>