MapServer / MapServer-import

3 stars 2 forks source link

[MapServer-WMS Server]Invalid time resolution returns data #1033

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: nsavard@mapgears.com Date: 2004/11/05 - 20:51

The following request returns data when the "wms_timeformat" is not used or is
set to "YYYY-MM-DD HH:MM:SS".  It should return no data.  Should it return an
exception?

http://server/cgi-bin/mapserv_43?map=/path/to/time_test/htdocs/wms_time.map&
request=GetMap&Version=1.1.1&LAYERS=time&Time=2004-01-01%2014:10

The layer metadata are:
  METADATA
    "DESCRIPTION" "time"
    "wms_title" "time"
    "wms_timeitem"  "TIME"
    "wms_timeextent"  "2004-01-01/2004-02-01"   
  END

Found on MapServer from CVS 20041105
Mozilla 1.6
tbonfort commented 12 years ago

Author: assefa Date: 2004/11/05 - 22:47

I am assuming that the data you are using is of format YYYY-MM-DD HH-MM-SS (with
values like 2004-01-01 14:10:00.
It should return a data in this case. Ultimatly the  wms_timeformat is there to
give the possibily to do queries using a certain level of resolution. 
For example a dabase that contain times like 2004-01-01 14:10:00, 2004-01-01
14:20:00 can be queried at a resolution of hour by setting the wms_timeformat to
something like YYYY-MM-DD HH with a time=2004-01-01 14 (It would return in this
example both elements).
But if the wms_timeformat is not used or the time passed does not match one of
the time format set, you end up comparing all the fileds of the time passed in a
parameter with all the fileds of the data (in this case is 2004-01-01 14:10
equals  to 2004-01-01 14:10:00 and it is definitly equal).
tbonfort commented 12 years ago

Author: nsavard@mapgears.com Date: 2004/11/09 - 17:42

Time variables used in MapServer have default values.  In the case of seconds
the default value is "00".  When a user enter a value like "2004-01-01 14:10",
MapServer assumed that the value is "2004-01-01 14:10:00".  It is why data is
returned eventhough the "wms_timeformat is not used or is set to "YYYY-MM-DD
HH:MM:SS".
tbonfort commented 12 years ago

Author: nsavard@mapgears.com Date: 2004/11/09 - 17:43

This is an invalid bug.