axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rhee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5494) Date conversion does not handle timzone offset correctly for date strings containing seconds
Date Wed, 06 Mar 2013 03:14:13 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13594285#comment-13594285
] 

David Rhee commented on AXIS2-5494:
-----------------------------------

Problem is due to binding mapping changes, service methods need to use java.util.Calendar
(binds to XSD dateTime) instead of java.util.Date (binds XSD date)

                
> Date conversion does not handle timzone offset correctly for date strings containing
seconds
> --------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5494
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5494
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.2
>            Reporter: David Rhee
>
> The date format containing seconds and timezone offset as follows generates an exception:
> yyyy-MM-dd'T'hh:mm:ssZ
> e.g.:
> 2013-03-04T15:07:14+11:00
> The web service call fails with the exception:
> Caused by: java.lang.IllegalArgumentException: ZONE_OFFSET
> 	at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2316)
> 	at java.util.Calendar.updateTime(Calendar.java:2469)
> 	at java.util.Calendar.getTimeInMillis(Calendar.java:1088)
> 	at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:623)
> ConvertUtil.java line 596:
>                     int hours = Integer.parseInt(restpart.substring(1,3));
>                     int minits = Integer.parseInt(restpart.substring(4,6));
>                     timeZoneOffSet = ((hours * 60) + minits) * 60000;

--
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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message