You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or an expected behavior. Feel free to close if not relevant. Seems to be related to #2183, but IMHO, OGR should write datetime fields in ISO format.
Expected behavior and actual behavior
I have isolated this simple CSV file with a datetime column. When I convert it into other formats, I except the column to looks like ISO-8601 format, at least with dashes (-) (and not slashes (/)).
More precisely, I expect values in this column to look like 2019-05-21T10:47:00 or 2019-05-21 10:47:00 or even the unchanged 2019-05-21 10:47:00+02. But actual results look like this: 2019/05/21 10:47:00+02.
Steps to reproduce the problem
Since I cannot attach .csv, here is a tiny excerpt that you can copy and paste into a layer.csv file.
OK, thanks. Was expecting this. Think I can cope with it in client code with date parsing libraries such as dateutil for Python. As soon as OGR can read its own output and 9917ae7 is published ;)
Not sure if this is a bug or an expected behavior. Feel free to close if not relevant. Seems to be related to #2183, but IMHO, OGR should write
datetime
fields in ISO format.Expected behavior and actual behavior
I have isolated this simple CSV file with a
datetime
column. When I convert it into other formats, I except the column to looks like ISO-8601 format, at least with dashes (-
) (and not slashes (/
)).More precisely, I expect values in this column to look like
2019-05-21T10:47:00
or2019-05-21 10:47:00
or even the unchanged2019-05-21 10:47:00+02
. But actual results look like this:2019/05/21 10:47:00+02
.Steps to reproduce the problem
Since I cannot attach
.csv
, here is a tiny excerpt that you can copy and paste into alayer.csv
file.ogr2ogr -f "GPKG" ogr_out.gpkg -oo HEADERS=YES -oo AUTODETECT_TYPE=YES layer.csv
layer
table inside theogr_out.gpkg
file : all date/times look like2019/05/21 10:47:00+02
,ogr2ogr -f "CSV" ogr_out.csv -lco STRING_QUOTING=IF_NEEDED -oo HEADERS=YES -oo AUTODETECT_TYPE=YES layer.csv
Operating system
Arch Linux
GDAL version and provenance
GDAL 3.0.4, released 2020/01/28 from the official Arch Linux repositories (community).
The text was updated successfully, but these errors were encountered: