[QGIS-Developer] QGIS Date, Time and Time Zones

Even Rouault even.rouault at spatialys.com
Fri Apr 30 08:13:18 PDT 2021


| Also I wonder if it would be possible to work with the GPKG developers 
to provide better timezone support there as well.

This is more about finding how to convince the GeoPackage spec 
maintainers that it is worth adding it than a technical one. I guess 
they wouldn't want to break compatibility with the core specification, 
so a clean way forward would be to deal with that as an extension, since 
GeoPackage has a mechanism to indicate that a given file uses extensions.

The gpkg_extensions table (https://www.geopackage.org/spec/#_extensions) 
could for example have one record to declare each (layer, field) that 
uses an extended date-time format

|table_name = |||{name_of_table_using_an_extented_datetime_column}
||

||column_name = {name_of_column_using_extended_datetime}||

||extension_name = ogr_extented_datetime (if the OGC SWG would accept to 
officialize it as a registered extension, that would become 
gpkg_extended_datetime)
||

||definition = ||||||https://gdal.org/geopackage_extended_datetime.html 
(or URL to updated GeoPackage spec if officialized)
||||

||||scope = read-write||||

What would be to decide is if the extension consists in relaxing the 
constraints of the existing DATETIME data type (to accept any time zone, 
or lack of time zone), or adding a new DATETIME_EXTENDED data type.


> Do you know what vector formats support timezones properly?

For general purpose formats: FlatGeobuf, GML, GeoJSON (well there's no 
datetime data type in JSON, so this is by guessing that a string looks 
like a ISO8601 formatted datetime...), CSV (same remark as GeoJSON)


-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210430/1ce908cf/attachment.html>


More information about the QGIS-Developer mailing list