MapServer icon indicating copy to clipboard operation
MapServer copied to clipboard

WMS Time: Timezone Designator Z not working as expected

Open OpenDEM opened this issue 5 years ago • 0 comments

When using Z (UTC, +00:00) in a WMS request like ...&time=2020-05-13 12:10:00Z/2020-05-13 12:50:00Z&... the behavor is not as expected resulting in a SQL Statement like: select timestamp from no_s5p where "timestamp" >= date_trunc('second',timestamp '2020-05-13 12:16:00Z') and "timestamp" <= (date_trunc('second',timestamp '2020-05-13 12:21:00Z') + interval '1 second' - interval '1 second');

But the time zone must be respected in the statement too archive the goal if you are working with any other time zone than UTC: select timestamp from no_s5p where "timestamp" >= date_trunc('second',timestamp with time zone '2020-05-13 12:16:00Z') and "timestamp" <= (date_trunc('second',timestamp with time zone '2020-05-13 12:21:00Z') + interval '1 second' - interval '1 second');

OpenDEM avatar May 16 '20 08:05 OpenDEM