Details
Description
Adding an OGC filter to a WFS request say filter by LOCATION='Bilgola' causes
subraction/addition of the local server time zone offset in GML output apparently to convert
back to UTC. For example in the Oracle SDE table OBS_DATE_TIME=2004-11-14 11:37:00
(its a simple ORACLE DATE type in format YYYY-MM-DD hh:mm:ss)
but on output to GML 11 hours is subtracted (we are now in zone GMT+11 Australian EST (10) + Daylight Saving (1))
to OBS_DATE_TIME=2004-11-14 00:37:00. Not good for us -
as for scientific data
we don't wan't to mislead/confuse clients about observation time.
Example request:
http://localhost:8080/geoserver/wfs?&VERSION=1.1.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=test:RAN.BEACH_TEMP&Filter=<Filter><PropertyIsEqualTo><PropertyName>LOCATION</PropertyName><Literal>Bilgola</Literal></PropertyIsEqualTo></Filter>
GML you get back in browser:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection numberOfFeatures="3" timeStamp="2012-02-07T06:13:55.734Z" .........">
<gml:featureMembers>
<test:RAN.BEACH_TEMP gml:id="RAN.BEACH_TEMP.10638">
<test:LON>151.3282</test:LON>
<test:LAT>-33.646</test:LAT>
<test:META_UUID>2d96ee5a-bc79-4d29-b627-f09f81f9e163</test:META_UUID>
<test:LOC_ID>5.0</test:LOC_ID>
<test:LOCATION>Bilgola</test:LOCATION>
<test:OBS_DATE_TIME>2004-11-14T00:37:00.593Z</test:OBS_DATE_TIME>
<test:TZONE>+11:00</test:TZONE>
<test:SST>19.3</test:SST>
<test:SHAPE>
<gml:Point srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG:4326">
<gml:pos>-33.646000000000015 151.32820000000004</gml:pos>
</gml:Point>
</test:SHAPE>
</test:RAN.BEACH_TEMP>
.....
.......
....
</gml:featureMembers>
</wfs:FeatureCollection>
Feature RAN.BEACH_TEMP.10638 has date_time 2004-11-14 11:37:00 in Oracle db
but on output to GML reports 2004-11-14T00:37:00.593Z. That is 11 hours
has been subtracted and its assuming that its a UTC time with the 'Z'
suffix. This is confusing and could be wrong as Geoserver is making assumption
about the time zone the observations were done in.
I note also the same request with CSV output issue doesn't happen i.e:
http://localhost:8080/geoserver/wfs?&VERSION=1.1.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=test:RAN.BEACH_TEMP&Filter=<Filter><PropertyIsEqualTo><PropertyName>LOCATION</PropertyName><Literal>Bilgola</Literal></PropertyIsEqualTo></Filter>&outputFormat=csv
Note also if you just request all features in layer with NO filter
the date_time is unchanged.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | beach_temp.csv [ 59100 ] |
| Attachment | beach_temp.csv [ 59101 ] |
| Attachment | beach_temp.csv [ 59102 ] |
| Attachment | beach_tempMod.shp [ 59145 ] |
| Attachment | beach_tempMod.shx [ 59146 ] |
| Attachment | beach_tempMod.dbf [ 59147 ] |
| Attachment | beach_tempMod.qix [ 59148 ] |
| Fix Version/s | 2.1.5 [ 18555 ] | |
| Fix Version/s | 2.1.4 [ 18238 ] |