Commit e4785141d8961985f83d29fa0516b8985b823d7c
1 parent
1f063969
Exists in
master
and in
112 other branches
Fix date filter in the request
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
php/epntap.php
@@ -192,10 +192,10 @@ function createFilter($targetName, $productTypes, $timeMin, $timeMax) { | @@ -192,10 +192,10 @@ function createFilter($targetName, $productTypes, $timeMin, $timeMax) { | ||
192 | array_push($filter, "dataproduct_type IN ('" . join("', '", explode(';', $productTypes)) . "')"); | 192 | array_push($filter, "dataproduct_type IN ('" . join("', '", explode(';', $productTypes)) . "')"); |
193 | } | 193 | } |
194 | if($timeMin) { | 194 | if($timeMin) { |
195 | - array_push($filter, "time_min >= " . dateToJD($timeMin)); | 195 | + array_push($filter, "time_max >= " . dateToJD($timeMin)); |
196 | } | 196 | } |
197 | if($timeMax) { | 197 | if($timeMax) { |
198 | - array_push($filter, "time_max <= " . dateToJD($timeMax)); | 198 | + array_push($filter, "time_min <= " . dateToJD($timeMax)); |
199 | } | 199 | } |
200 | return (count($filter) > 0 ? ' WHERE ' . join(' AND ', $filter) : ''); | 200 | return (count($filter) > 0 ? ' WHERE ' . join(' AND ', $filter) : ''); |
201 | } | 201 | } |