Gertjan van Oosten ha scritto: > Hi Andrea, > >> Locate where the feature is produced, > > I tried to follow the code, but I got lost. Any pointers?
I think you should look in the GML encoder, the FeatureTransformer class in particular. >> and then use DateUtils to encode >> the date with the appropriate type, and you should get exactly the >> same behaviour as GeoServer. > > We-ellll... GeoServer (at least the 1.5.1 I'm running) still uses > the class TemporalAttributeType that does: > > // this might be right, maybe not, but anyway, its a default formatting > static java.text.DateFormat format = java.text.DateFormat.getInstance(); Hmm... no, this date format is used only as a last resort parser if you try to initialize an attribute with a string, but I don't see it used for encoding? > for new features. Which uses some default DateTime format that is > Locale-dependent, and not the ISO 8601 format that is used when updating > existing features. There are open issues on JIRA for that one IIRC. > And yes, it's *very* inconvenient, so my application currently has a > work-around: if the feature is new (has no fid) I use a Locale-dependent > format, otherwise I use the ISO 8601 format... Hem... this looks strange to me, I fixed date encoding back in March?. If you look in FeatureTranslator, which is the class used to turn Feature objects into GML, it is using DateUtil, which does proper ISO 8601 encoding afaik. I just queried Geoserver 1.5.x snapshot over a dataset that has date, time, and datetime attributes, the output is: <tiger:dt>2007-07-02T12:06:37.671</tiger:dt> <tiger:timetest>15:48:50.531</tiger:timetest> <tiger:datetest>2007-07-04</tiger:datetest> Hmm... are sure you're not using Geoserver 1.4.x? >> As you can see, I'm wasn't kidding, the WFS datastore is basically >> unmantained at the moment :( > > Isn't that a bit odd? One would think that that would be a core > component... Core or not, as every other component it needs someone with time to follow it. At the moment Geoserver does not do WFS cascading so I have no mandate to work on it (besides, the only time I tried to, my patch, needed to make cascading work, was rejected by the old maintainer with no good reason, so I just gave up trying to work on it). Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
