> > Basically, most data stores are already doing the right thing, and > reporting precise data type. All JDBC data stores are really using > java.sql.Date, java.sql.Time and java.sql.TimeStamp in both the > attribyte type definition and as the actual attribute values. > Shapefile is only capable of dealing with generic dates, and is using > java.util.Date. > > The only real issue was that the GML feature type and feature encoders > were ignoring those types! A tiny patch there makes it work fine. > > Justin, I think the same fixes can be applied to the new GML encoders. > (btw, the feature type encoder should really be something included > in Geotools imho, if I'm not mistaken it's in Geoserver now, right?). Yup it could, I think it would be useful. I added it in GEoServer just to save time.
I must say I am much more happy with this solution. When I came across this I tried to make the distinction between date and time with java.util.Date and java.util.Calendar, but as we know this does not do it as no datastores ever give us a calendar. Part of the reason I didn't because I didn't think non-jdbc datastores would be creating jdbc date objects. However these classes are like you say part of the jdk and are as close to standard as we can get. So I am all for updating the current mappings to xml work directly with them. > > The only significant datastore not doing fine afaik is the WFS one, > which uses java.util.Date for all xs types if I'm not mistaken. > > Now, as a rule of thumb, since these classes are already in the jdk, > we could ask other datastore capables of distinguishing between date, > time and datetime to use java.sql.Date and java.sql.Time for > xs:date and xs:time. That would solve all problems in the short term, > and would not require a dependence on Joda time (that's the library I > was suggesting to use). > Maybe we should add an article to the developers guide. > > For the longer term, we'll have to watch Bryce proposal. > > Cheers > Andrea > > !DSPAM:1004,45ee9aa1172621460912952! > -- Justin Deoliveira The Open Planning Project http://topp.openplans.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel