A client of my Web service is sending a date attribute in the following format (ISO):
2011-09-12T13:46:00+01:00
for a request sent at 13:46, local time (CEST). My Web service (JAX-WS on Glassfish), written as:
@WebMethod
public String getSource(Long id, Date asOfDate) {
this.log.debug(asOfDate);
// ...
}
interprets as Mon Sep 12 14:46:00 CEST 2011 (that’s the output of the above log command). Why is not interpreted as Mon Sep 12 13:46:00 CEST 2011?
I don’t know why it doesn’t parse the time correctly, but I would try changing the Date parameter to Calendar parameter.