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 "Nathan McDonald (JIRA)" <ji...@apache.org> on 2008/09/22 06:53:44 UTC

[jira] Created: (AXIS2-4041) ConverterUtil.convertToString(Calendar) incorrectly relies upon Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default

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


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


[jira] Assigned: (AXIS2-4041) ConverterUtil.convertToString(Calendar) incorrectly relies upon Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default

Posted by "Dimuthu Leelarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Leelarathne reassigned AXIS2-4041:
------------------------------------------

    Assignee: Dimuthu Leelarathne

> 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
>            Assignee: Dimuthu Leelarathne
>         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


[jira] Resolved: (AXIS2-4041) ConverterUtil.convertToString(Calendar) incorrectly relies upon Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default

Posted by "Dimuthu Leelarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Leelarathne resolved AXIS2-4041.
----------------------------------------

    Resolution: Fixed

Fixed in revision 699186

> 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
>            Assignee: Dimuthu Leelarathne
>         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


[jira] Updated: (AXIS2-4041) ConverterUtil.convertToString(Calendar) incorrectly relies upon Calendar.isSet(Calendar.ZONE_OFFSET), overrides Timezone with default

Posted by "Nathan McDonald (JIRA)" <ji...@apache.org>.
     [ 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