[
https://issues.apache.org/jira/browse/AXIS2-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721020#action_12721020
]
Maite Clay commented on AXIS2-4099:
-----------------------------------
Test code. (2 time zones tested in case the first one is the current timezone)
============================================
import org.apache.axis2.databinding.utils.ConverterUtil;
public class TypeConversionTest {
public static void main(String[] args) {
ConverterUtil.convertToDate( "2009-06-17-05:00" );
ConverterUtil.convertToDate( "2009-06-17-06:00" );
}
}
============================================
Exception in thread "main" java.lang.IllegalArgumentException: ZONE_OFFSET
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2475)
at java.util.Calendar.updateTime(Calendar.java:2276)
at java.util.Calendar.getTimeInMillis(Calendar.java:1058)
at
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:619)
at TypeConversionTest.main(TypeConversionTest.java:5)
============================================
JVM info is:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20071213a
(ifix 129397: SR4 + IY99287 + IY99356 + IY98136 + IZ09166 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Server 2003 x86-32
j9vmwi3223ifx-20070525 (JIT enabled)
> ConverterUtil.convertToDateTime() is to lenient
> -----------------------------------------------
>
> Key: AXIS2-4099
> URL: https://issues.apache.org/jira/browse/AXIS2-4099
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: adb
> Affects Versions: 1.4.1, 1.4, 1.3
> Reporter: Marcel Ammerlaan
> Priority: Minor
> Attachments: DateTimeBug.java
>
>
> When parsing an invalid date (as specified by the XSD Schema specification),
> Axis relies on the java.util.Calendar leniency to parse. E.g. 2008-02-31
> (31st of februari) is invalid according to
> http://www.w3.org/TR/xmlschema-2/#dateTime. convertToDateTime() returns the
> 2nd of march instead.
> This can be easily solved by setting the Calender leniency to false
> (setLenient(false)).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.