On 20.08.2020 10:21, Jukka Rahkonen wrote:
> Handling dates in SQLite generally is somehow special, see for example 
> https://www.sqlitetutorial.net/sqlite-date/.
> I believe that in SpatiaLite the dates/times are stored either as strings or 
> Julian numbers it is up to client application to know how to parse the data. 
> GeoPackage is using DATE as
> ISO-8601 date string in the form YYYY-MM-DD encoded in either UTF-8 or UTF-16 
> and stored as SQLite TEXT.
> and DATETIME as
> ISO-8601 date/time string in the form YYYY-MM-DDTHH:MM:SS.SSSZ with T 
> separator character and Z suffix for coordinated universal time (UTC) encoded 
> in either UTF-8 or UTF-16 and stored as SQLite TEXT.
>
> As a helper for the clients the CREATE TABLE that can be read from the 
> database may contain a hint like CREATE TABLE 'timetest' ( "ogc_fid" INTEGER 
> PRIMARY KEY AUTOINCREMENT, 'time' DATE, 'attr' VARCHAR(1), "GEOMETRY" POINT). 
> That info should always be included in geopackages.
>
> Parsing dates as strings from Spatialite may be the best alternative and it 
> is OK for Geopackage as well, even bacause of explicit definitions it is 
> possible to read dates and datetimes from Geopackage right into correct 
> datatypes.


yeah, it reads as if Sqlite does not handle dates/times at all
https://stackoverflow.com/questions/5425557/sqlite-jdbc-rs-getdate-gettimestamp-etc-all-return-wrong-valueshttps://stackoverflow.com/questions/5425557/sqlite-jdbc-rs-getdate-gettimestamp-etc-all-return-wrong-values

so how about we always fetch it as String and parse the 3 formats given above? 
and only if that fails it is given to FlexParser, preferably via FlexFeature 
becuase of loading time delay.

could someone build me a test dataset?

..ede


---

** [bugs:#497] Shapefile export slowed down because of FlexibleDateParser**

**Status:** open
**Created:** Mon Aug 17, 2020 11:47 AM UTC by michael michaud
**Last Updated:** Thu Aug 20, 2020 08:21 AM UTC
**Owner:** michael michaud


Exporting a big dataset to shapefile (1 300 000 objets - around 225+115 Mb) 
with version 1.15 lasted more than 20 minutes.
Most of the time is used by FlexibleDateParser.parse().


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to