diff --git a/tools/wiki/rencontres.php b/tools/wiki/rencontres.php index 42a119a..2926d7e 100644 --- a/tools/wiki/rencontres.php +++ b/tools/wiki/rencontres.php @@ -35,8 +35,10 @@ $data = array( 'passe' => array() ); -$avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and value > unix_timestamp(now()) order by value asc limit 5"; -$passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and value < unix_timestamp(now()) order by value desc limit 5"; +$avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(utc_date(from_unixtime( + value)), utc_date(now())) >= -1 order by value asc limit 5"; +$passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(uitc_date(from_unixtime( + value)), utc_date(now())) < -1 order by value desc limit 5"; function getevents($list) { global $fields;