axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan McDonald (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-4041) ConverterUtil.convertToString(Calendar) incorrectly relies upon Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default
Date Mon, 22 Sep 2008 04:57:46 GMT

     [ 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message