[Geoserver-devel] [JIRA] (GEOS-8356) WMS GetFeatureInfo fomrats text/html, text/plain, text/xml and application/vnd.ogc.gml (GML2) don't handle time correctly

Nuno Oliveira created an issue

GeoServer / BugGEOS-8356

WMS GetFeatureInfo fomrats text/html, text/plain, text/xml and application/vnd.ogc.gml (GML2) don’t handle time correctly

Issue Type:

BugBug

Affects Versions:

2.12.0

Assignee:

Unassigned

Components:

WMS

Created:

19/Oct/17 9:59 AM

Priority:

MediumMedium

Reporter:

Nuno Oliveira

The following formats: GeoJson, GML 3.1 and GML 3.2 have the correct default behavior, i.e. they take into account the timezone when encoding a date \ time attribute.

The following formats: text/html, text/plain, text/xml and application/vnd.ogc.gml (GML2), don’t have any special treatment for date \ times and simply do a to string regardless of the timezone or time format.

For example the text/plain output format time encoding:
https://github.com/nmco/geoserver/blob/8d5c1dbc774e68baf445354bcb5e5fc2d5c122e3/src/wms/src/main/java/org/geoserver/wms/featureinfo/TextFeatureInfoOutputFormat.java#L106-L135

It should also be possible to control if GeoServer will or will not take into account the the time zone when encoding date \ time attributes using this Java property:

-Dorg.geotools.localDateTimeHandling=true

Formats GeoJson, GML 3.1 and GML 3.2 have the correct default behavior are taking into account this flag.

To reproduce this issue just perform a WMS GetFeatureInfo in a layer with a time attribute. Formats GeoJson, GML 3.1 and GML 3.2 will encode the time values with the proper time zone information but the other formats will just to a simple to srng.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100066-sha1:b2cb244)

Atlassian logo