title: Wrong timezone being used in Java web service
body: <p>I have a JAX-B java web service which I'm using to update a database. Each row in the table that I'm updating is represented by an object similar to below: -</p>
  
  <pre><code>public class Item {
      private String id;
      private Date startDate;
      private Date endDate;
  
      public Item() { }
  
      ...
  
  }
  </code></pre>
  
  <p>This class is being instantiated in a separate program and then passed via SOAP in a message similar to below: -</p>
  
  <pre><code>...
  
  &lt;item&gt;
      &lt;id&gt;D001IAAC030&lt;/id&gt;
      &lt;startDate&gt;2009-09-17T00:00:00.000+01:00&lt;/startDate&gt;
      &lt;endDate&gt;2009-10-01T00:00:00.000+01:00&lt;/endDate&gt;
  &lt;/item&gt;
  
  ...
  </code></pre>
  
  <p>As you can see, due to BST the UTC time has a +01:00 offset. However, when the object is marshalled on the server (which is on my local machine as well), it reverts to GMT and deducts 1 hour from the dates.</p>
  
  <p>Can you tell me how I can either: -</p>
  
  <ol>
  <li>Set my Glassfish server to right locale so that the dates are recognised as being BST.</li>
  <li>Tell me how I can intercept the marshalling at the web service end so that I can set the timezone myself before the date is set.</li>
  </ol>
  
  <p>TIA,</p>
  
  <p>Urf</p>