axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Frid (JIRA)" <>
Subject [jira] [Created] (AXIS2-5437) Wrong daylight when converting XML datetime string to Calendar
Date Thu, 11 Oct 2012 15:07:03 GMT
Michael Frid created AXIS2-5437:

             Summary: Wrong daylight when converting XML datetime string to Calendar
                 Key: AXIS2-5437
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.6.1, 1.5.5
            Reporter: Michael Frid

We use axis2 (1.5) client stub for response returning datetime data type.
The problem is that when string doesn't include the TZ information (i.e 2012-10-11T01:54:30.13)
returned Calendar instance is missing daylight information (DST_OFFSET). Because of that wrong
Date (with one hour advanced) is returned.

The problem tracks down to org.apache.axis2.databinding.utils.ConverterUtil, convertToDateTime()
At the end, calendar.set(Calendar.DST_OFFSET, 0) statement is wrong.

In 1.6.1 I see the trial to fix the problem

            // set the day light offset only if the time zone is present
            if (source.length() > 19){
                calendar.set(Calendar.DST_OFFSET, 0);

But, check for 19 is wrong when string includes the ms part

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message