[
https://issues.apache.org/jira/browse/AXIS2-4041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nathan McDonald updated AXIS2-4041:
-----------------------------------
Attachment: DateTest.java
Attaching a simple example. Prints out the results of two convertToString
calls, one without ZONE_OFFSET set and one with ZONE_OFFSET set by forcing it
to be calculated.
The second output will be 2008-01-01T00:00:00.000+08:00, which is correct
The first will depend on your locale, but unless you're in a +8:00 locale
should see a different result.
> ConverterUtil.convertToString(Calendar) incorrectly relies upon
> Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-4041
> URL: https://issues.apache.org/jira/browse/AXIS2-4041
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: databinding
> Affects Versions: 1.4.1
> Reporter: Nathan McDonald
> Attachments: DateTest.java
>
>
> We use Calendar.clear() to clear out all populated fields returned
> Calendar.getInstance(), before expressly setting the timezone and the fields
> we want set.
> This clear call has cleared out the ZONE_OFFSET field.
> Since the Timezone is set, the ZONE_OFFSET will be set only when it needs to
> be calculated.
> the call to ConverterUtil.convertToString(Calendar) checks ZONE_OFFSET, and
> if it is not set then sets the timezone to the Locale Default. This
> overrides the timezone we actually wanted.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]