Ede, Broken tests : my feeling is that FlexibleDateParser is doing too much (more than hundred different formats). Wonder if it wouln't be better to have a parser with less formats (removing ambiguous formats like dd/MM, MM/dd, MM/yy, yy/MM etc.) and add a mechanism to use a user-defined parser where it is needed (we already have one in options panel for table attribute display). We could also add a plugin to change a String attribute to a Date attribute with an ad'hoc parser (most databases have a set of specific functions to handle dates and times) Yes I saw the code of sqlite driver. Seems that I changed the code from getDate to getTimestamp in 2013 with the following comment : "fix 1472782 : date is now shown with time in attribute table. It is persisted as timestamp in postgis database and jml files, but time part is still lost in shapefiles." Possible because both sql.Date and sql.Timestamp are subclasses of java.util.Date. Currently, the code is the same for all the drivers. Maybe we can do better using getDate or getTimestamp depending on the jdbc type, but I would wait for an actual problem before modifying this code. The problem I found in sqlite driver is that attributes declared as TIMESTAMP but stored as text does not return java.sql.Timestamp but varchar so that our code just read it as String and store it as AttributeType.STRING (https://github.com/xerial/sqlite-jdbc/issues/532) Michaël
|
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel