Hello Kjetil, It might be enough to replace ' ' with 'T' between toString() and making the node, but I know Java so poor that I'd let somebody else to provide the patch.
Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com On Thu, 2008-11-20 at 14:02 +0100, Kjetil Kjernsmo wrote: > On Thursday 20 November 2008 12:47:45 Kjetil Kjernsmo wrote: > > The problem has a pretty clear symptom: When running against an endpoint > > based on a Jena Model, I get the following date: > > > > <j.0:dateAccepted > > rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2003-07-11 > > 09:25:31.0</j.0:dateAccepted> > > > > It lacks the 'T' which is needed in the xsd:dateTime. > > I think I found it: In VirtGraph, there is > > else if (o instanceof java.sql.Timestamp) > { > RDFDatatype dt = null; > dt = > TypeMapper.getInstance().getSafeTypeByName("http://www.w3.org/2001/XMLSchema#dateTime"); > return Node.createLiteral(o.toString(), null, dt); > > but o.toString() will return the JDBC timestamp format, which is what we see. > Kinda weird there is no exception there... Anyway, it seems pretty clear that > o.toString can't be used, but I haven't found any simple way to get this > right. Any takers? > > > Kind regards > > Kjetil Kjernsmo