Skip to content

Commit

Permalink
Convert string to date before comparing
Browse files Browse the repository at this point in the history
It was generating bad false positives
  • Loading branch information
anarute committed May 7, 2024
1 parent 23aa016 commit 485b2bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/facade/action/SyncCalendarAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ protected function doExecute()
}

foreach ($this->datesRanges as $range) {
if (!is_array($range) || !isset($range['start']) || $range['start'] < $startSyncPeriod) continue;
if (!is_array($range) || !isset($range['start']) || gmdate("Ymd\THis\Z", strtotime($range['start'])) < $startSyncPeriod)
continue;

$start = str_replace("-", "", $range['start']);
$end = str_replace("-", "", $range['end']);
Expand Down

0 comments on commit 485b2bd

Please sign in to comment.