diff --git a/src/Toolbox.php b/src/Toolbox.php index df245fa0..e562009e 100644 --- a/src/Toolbox.php +++ b/src/Toolbox.php @@ -511,11 +511,11 @@ public static function findTemporalGapsInTable(string $table, DateTimeInterface 'date AS `end`' ], 'FROM' => $records_query, - 'WHERE' => array_merge($boundaries, [ + 'WHERE' => [ 'NOT' => ['prev_date' => null], // new QueryExpression('TIMESTAMPDIFF(SECOND, `records`.`prev_date`, `records`.`date`) > ' . $interval_in_seconds) new QueryExpression('DATE_ADD(`records`.`prev_date`, ' . $sql_interval . ') < `date`') - ]), + ], ], // Gap before the beginning of the serie