[ 
http://jira.codehaus.org/browse/JIBX-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski resolved JIBX-185.
----------------------------------

      Assignee: Dennis Sosnoski
    Resolution: Won't Fix

The schema specification gives the dateTime format as CCYY-MM-DDThh:mm:ss, and 
says "The CCYY field must have at least four digits, the MM, DD, SS, hh, mm and 
ss fields exactly two digits each (not counting fractional seconds); leading 
zeroes must be used if the field would otherwise have too few digits." Your 
sample is missing the required seconds component.

> JibxException thrown from org.jibx.runtime.Utility when attempting to 
> deserializeDate on valid xml schema date format.  
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-185
>                 URL: http://jira.codehaus.org/browse/JIBX-185
>             Project: JiBX
>          Issue Type: Bug
>          Components: core
>    Affects Versions: JiBX 1.1.5
>         Environment: mac osx w/ Java 1.5
>            Reporter: Hardip Singh
>            Assignee: Dennis Sosnoski
>
> according to w3c xml schema spec, date formats can be defined as 
> 'YYYY-MM-DD-hh:mm".
> When attempting to deserialize this format using the org.jibx.runtime.Utility 
> deserializeDate method, a jibxexception is thrown upon validation.
> Below is a simple testcase showing this....  I poked around the source and 
> found that the validateDate method does not recognize this format as a valid 
> date format. 
> package foo.test.jibx;
> import junit.framework.TestCase;
> import org.jibx.runtime.Utility;
> import org.jibx.runtime.JiBXException;
> import java.util.Date;
> public class JibxDateFormatTest extends TestCase
> {
>       public void testDateSerializationWithTimeZone() throws Exception
>       {
>               String dateStr = "1950-10-01-02:00";                    
>               try {
>                       Date date = Utility.deserializeDate(dateStr);
>                       assertNotNull(date);
>               }
>               catch (JiBXException ex)
>               {
>                         ex.printStackTrace();
>                       assertTrue(false);
>               }               
>       }       
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to