I've been looking at the DateConversionTest.testToDateFormats test in
the SDO CTS. The test iterates over a list of valid date format strings
and calls DataHelper.toDate() for each one.
 
However, the test is only asserting that the returned date is not null
rather than checking that the correct date is returned.
 
I am in the process of expanding this test to check the returned date
but I have some questions about what the expected date is for formats
using duration types.
 
The SDO specification doesn't provide much detail on handling of
duration types but here are a few examples of how Tuscany is currently
mapping SDO date format strings to Java dates:
 
P2006Y 08M 10D T 12H 24M 07S gets converted to
2006-08-10T11:24:07.000GMT which seems pretty reasonable.
 
P2006Y 10D T 12H gets converted to P2006Y 10D T 12H which again seems
reasonable.
 
The conversions I don't understand are:
 
-P2006Y 08M 10D T 07S.2 gets converted to 1933-05-25T00:59:52.998GMT
 
-P 04M 10DT12H 24S.88 gets converted to 1932-09-23T12:59:35.912GMT
 
I'm not sure if these are the expected values or if I should file a JIRA
against the CTS?
 
Thanks,
 
Andy.
 
 

Reply via email to