axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1575) when sending DateTime data, number of hours in Calendar is not being sent properly
Date Wed, 29 Sep 2004 08:52:32 GMT
The following comment has been added to this issue:

     Author: Ashutosh Shahi
    Created: Wed, 29 Sep 2004 1:51 AM
       Body:
Hi Sreeram,
        The problem you are facing is because dateTime is always sent in GMT Timezone over
the wire, i guess EST is -5 GMT. To get over the issue, once your endpoint receives the dateTime
you can do the following:
Once you receive the dateTime in a java.util.Calendar, do:

cal.setTimeZone(java.util.TimeZone.getDefault()); 

This will set the received the dateTime according to the current timezone.
Hope this helps.
Ashutosh
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1575?page=comments#action_53485

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1575

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1575
    Summary: when sending DateTime data, number of hours in Calendar is not being sent properly
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             beta-2

   Assignee: 
   Reporter: sreeram

    Created: Tue, 28 Sep 2004 8:17 AM
    Updated: Wed, 29 Sep 2004 1:51 AM

Description:
when creating a Calendar object as follows

java.util.Calendar cal = new java.util.GregorianCalendar();

			cal.set(Calendar.YEAR, 2001);
			cal.set(Calendar.MONTH, Calendar.DECEMBER);
			cal.set(Calendar.DATE, 17);
			cal.set(Calendar.HOUR, 0);
			cal.set(Calendar.HOUR_OF_DAY, 0);
		cal.set(Calendar.MINUTE, 0);
			cal.set(Calendar.SECOND, 0);
			cal.set(Calendar.MILLISECOND, 0);

we are setting the Hours to 0.

The format being used is new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'S'Z'");

But when the Request is being sent over the Wire using Axis 1_2beta tools , the End Point
Service is receiving the dateTime data as 
<TradeDate xmlns="">2001-12-17T05:00:00.000Z</TradeDate>

the number of hours is being incremented by 5. And because of that , the correct trade is
not being identified in the Database. we are in the EST TimeZone.

How do we resolve this issue? Any suggestions or tips is greatly appreciated.

Regards,

Sree


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message