I use this solution to display actual QDateTime value with milliseconds in a temporary memory layer. And I use another solution to export as CSV the value including the millisecond value.
But then, I realized that "Use Date/Time" option changed the type of the time_break
field from QDateTime to string when I exported as GeoPackage. But I need a datetime field in the GeoPackage.
Export using "Use Date/Time" option:
Result (converted to string):
If I don't use "Use Date/Time" option, it exports the field as QDateTime, but it changes all millisecond values to zero:
How can I export it as a GeoPackage to contain the datetime field with the actual millisecond value?
{ "type": "FeatureCollection", "name": "timestamp", "features": [ { "type": "Feature", "properties": { "id": "1", "timestamp": "2022-05-20T01:02:03.456+01:00" }, "geometry": { "type": "Point", "coordinates": [ 47224.476043935123016, 5282390.128387222066522 ] } } ]}
Qt::ISODateWithMs
.