[mapserver-users] GeoJSON Date Anomalies

Seth G sethg at geographika.co.uk
Fri Apr 23 02:34:09 PDT 2021


Hi,

I'm getting some strange date formatting anomalies when returning GeoJSON from MapServer. It might be more of a GDAL issue than MapServer. 

Using MapServer from the main branch (7-7) and gdal302.dll - the exact same MapServer setup returns dates with different formatting dependent on the machine. 

Dates on a local machine have T, dates on the server do not:

- Windows 10 local: "LastUpdatedDateUtc": "2021-04-20T10:33:31.626"
- Windows 2019 Server: "LastUpdatedDateUtc": "2021-04-20 10:33:31.6259376" 

Data is coming from the MSSQL Driver and database requests are identical. WFS requests are also identical for the test. 

OUTPUTFORMAT block below:

    OUTPUTFORMAT
        NAME "geojson"
        DRIVER "OGR/GEOJSON"
        MIMETYPE "application/json; subtype=geojson; charset=utf-8"
        FORMATOPTION "FORM=SIMPLE"
        FORMATOPTION "STORAGE=memory"
        FORMATOPTION "LCO:NATIVE_MEDIA_TYPE=application/vnd.geo+json"
    END

Has anyone else experienced this? Does a machine locale affect date formats?


Seth
--
web:http://geographika.co.uk
twitter: @geographika



More information about the MapServer-users mailing list