[gdal-dev] Bad Date Handling

Paul Ramsey pramsey at cleverelephant.ca
Tue Apr 5 11:56:07 PDT 2016


Hey all,

We've had a client working with dodgy data who would like an option to
avoid incompatible date mangling when reading bad data. Basically, OGR
will consume some funky dates from CSV and Excel, like 0000/00/00, but
it will NULL out others, like 1971/34/34. The net result is that, when
the data are written out to PgSQL, is some null values, and other
values that get converted to things PgSQL cannot consume (0000/00/00
becomes 2000/00/00 and PgSQL then errors out on that).
They'd like to just coerce *all* invalid dates to NULL,

I've done a small patch that does that, in the presence of a config
flag, any thoughts on if it's acceptable?

https://github.com/pramsey/gdal/pull/1

ATB,

P


More information about the gdal-dev mailing list