Andrew Walsh created GEOS-4951:
----------------------------------

             Summary: WFS request with OGC filter subtracts time zone offset 
from database date_time - GML output only
                 Key: GEOS-4951
                 URL: https://jira.codehaus.org/browse/GEOS-4951
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 2.1.3
         Environment: Geoserver 2.1.3 with Geotools 2.7.4, Windows XP/Jetty, 
ARCSDE datastore with ESRI 9.3 SDK jars
            Reporter: Andrew Walsh
            Assignee: Andrea Aime
             Fix For: 2.1.4


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.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to