You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2007/07/13 16:15:06 UTC
[jira] Updated: (AXIS2-2959) Serialization and Deserialization is
done in local Timezone, but declared as UTC
[ https://issues.apache.org/jira/browse/AXIS2-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas updated AXIS2-2959:
------------------------------------
Assignee: Amila Chinthaka Suriarachchi
> Serialization and Deserialization is done in local Timezone, but declared as UTC
> --------------------------------------------------------------------------------
>
> Key: AXIS2-2959
> URL: https://issues.apache.org/jira/browse/AXIS2-2959
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: adb
> Affects Versions: 1.1
> Reporter: Thomas Weinlein
> Assignee: Amila Chinthaka Suriarachchi
>
> The convertion of a Calendar in org.apache.axis2.databinding.utils.ConverterUtil is erronous.
> It serializes the time in the local time format but declares it as UTC via appending a 'Z':
> public static String convertToString(Calendar value) {
> SimpleDateFormat zulu =
> new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
> Date date = value.getTime();
> // Serialize including convert to GMT
> synchronized (zulu) {
> // Sun JDK bug http://developer.java.sun.com/developer/bugParade/bugs/4229798.html
> return zulu.format(date);
> }
> }
> the correct version would include the following line:
> zulu.setTimeZone(TimeZone.getTimeZone("UTC"));
> The same is true for the deserialization by
> public static Calendar convertToDateTime(String source)
> This leads to the situation that everything works fine as long as client and server are running in the same time zone and both are using Axis2. But date time values from other clients or time zones are not deserialized correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org