You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ke...@ubs.com on 2007/05/17 18:42:10 UTC

[Axis2] Serialization of Calendar/Date type to GMT without DST

I'm getting invalid results from my Web Service based under Axis2
v.1.1.1.  It is serializing my Calendar attribute of my Javabean to GMT
- without respect for DST offset in effect.
 
We have a server running BST (TimeZone="GB-Eire") where DST is in
effect, offset =1).
 
Assumptions:
---------------------
Date in: "16-MAY-2007"
TimeZone = "'GB-Eire"
ZONE_OFFSET: 0  
DST_OFFSET: 1
 
Javabean:
-------------
// default TimeZone & Locale
private Calendar basePriceDate = new GregorianCalendar();

As a test, If I parse into a Date like: 
------------------------------------------------------
new SimpleDateFormat("dd-MMM-yyyy").parse("15-MAY-2007").toString)
=   Wed May 16 00:00:00 BST 2007
new SimpleDateFormat("dd-MMM-yyyy").parse("15-MAY-2007").toGMTString) =
15 May 2007 23:00:00 GMT
 
SOAP result to my Webservice
-----------------------------------------------
 
            <basePriceDate
xmlns="http://types.ws.gcs.ubs.com/xsd">2007-05-15T23:00:00.000Z</basePr
iceDate>

As you can see it follows the same conversion to GMT......but without
respect to DST offset.  
 
Is there a way to override this behavior????
 
Ken