It makes sense Andrea. Thanks a lot. I'll change the time zone to GMT and will get back to you with the results.

On 05/08/2014 12:11 PM, Andrea Aime wrote:
On Thu, May 8, 2014 at 10:07 AM, Jacinto Estima <jacinto.est...@gmail.com <mailto:jacinto.est...@gmail.com>> wrote:

    Something else to add:

    I checked again the log file and there are two queries:

    1. to get the max time available from the data

    SELECT max("measure_time") FROM (select a.id_number, a.geom,
    b.id_station, b.measure_time, b.wind_direction, b.wind_speed from
    test.mesurement_stations as a


    left join test.mesurements as b
    on a.id_number=b.id_station
    order by b.measure_time
    ) as "vtable"

    2. to get all the points for that max time


    SELECT encode(ST_AsBinary(ST_Simplify(ST_Force_2D("geom"),
    0.04539062499999318)),'base64') as "geom" FROM (select
    a.id_number, a.geom, b.id_station, b.measure_time,
    b.wind_direction, b.wind_speed from test.mesurement_stations as a
    left join test.mesurements as b
    on a.id_number=b.id_station
    order by b.measure_time
    ) as "vtable" WHERE  (*"measure_time" = '2012-12-31T19:00:00Z'*
    AND "measure_time" IS NOT NULL  AND "geom" &&
    ST_GeomFromText('POLYGON ((75.98650390625001 37.81123046875,
    75.98650390625001 56.98876953125, 131.70349609375 56.98876953125,
    131.70349609375 37.81123046875, 75.98650390625001
    37.81123046875))', 2))

    If I query directly in postgis, I get "*2012-12-31 23:00:00*" so I
    conclude that for some reason Geoserver is using the wrong time
    for the second request (the result from the first request should
    be used instead). Am I thinking right?


Quite likely, GeoServer does not have an internal good handling of timezones, that's why I was suggesting to have everything running in GMT (the issue you have there looks like a timezone shift).

Cheers
Andrea

--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to