<div dir="ltr">Even,<div>I'm not sure I agree with your conclusion.</div><div><br></div><div>I think the intention would be to write</div><div><br></div><div>timecol between time0 and time0+resolution</div><div><br></div><div>which translates to:</div><div><br></div><div>time0<=timecol<=time0+resolution</div><div><br></div><div>whereas we want:</div><div><br></div><div>time0<=timecol<time0+resolution</div><div><br></div><div>thus the hack to use time0+resolution-1second which is clearly incorrect when the desired resolution is the second (and somewhat incorrect for the other resolutions)</div><div><br></div><div><br></div><div>I'd say this is a bug.</div><div><br></div><div>--</div><div>thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 February 2016 at 15:43, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :<br>
> Hello,<br>
><br>
> I have a WMS-T layer. The datasource is in a postgis layer. The SQL request<br>
> send by MapServer is something like this:<br>
><br>
> ("timestamp" between date_trunc('second',timestamp<br>
> '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp<br>
> '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')<br>
><br>
> I understand the + interval '1 second' - interval '1second', but I can't<br>
> understand how the first interval resolution come from, see [1].<br>
><br>
> I guess this is calculated from wms_timedefault or wms_timeextent. Here my<br>
> METADATA LAYER of my mapfile:<br>
><br>
>             "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"<br>
>             "wms_timeitem" "timestamp"<br>
>             "wms_timedefault" "2016-02-16T23:20"<br>
><br>
> Any idea how I can "force" the interval resolution to minute?<br>
<br>
</span>Yves,<br>
<br>
The resolution comes from the value of time parameter passed in the WMS<br>
request (or the timedefault value if time is not specified). To get a one<br>
minute resolution, the time parameter must be expressed in minutes.     This is<br>
actually explained in <a href="http://mapserver.org/ogc/wms_time.html" rel="noreferrer" target="_blank">http://mapserver.org/ogc/wms_time.html</a> ( "Interpreting<br>
Time Values", "Exceptions to this rule")<br>
<br>
AFAICS there's no way to override that currently (although it might<br>
potentially be desirable, for example by taking into account the resolution in<br>
the timeextent syntax)<br>
<br>
One workaround to indicate the intent to the client is to specify<br>
"wms_timeformat". Although it doesn't seem to work properly currently, ie if<br>
you specify "YYYY-MM-DDTHH:MM", a value with seconds will be accepted as<br>
validating the beginning of the pattern. Hum looks like a bug.<br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></font></span></blockquote></div><br></div>