fix: monitor tv -> set monitor create date time to 00:00.00 for comparison to air date

This commit is contained in:
2025-06-20 11:46:11 -05:00
parent 3e93a7c9c1
commit be7b610111
2 changed files with 2 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ FROM dunglas/frankenphp:php8.4
ENV SERVER_NAME=":80" ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off" ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime" ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
ENV APP_VERSION="0.0.1"
RUN install-php-extensions \ RUN install-php-extensions \
pdo_mysql \ pdo_mysql \

View File

@@ -127,7 +127,7 @@ readonly class MonitorTvShowHandler implements HandlerInterface
private function episodeReleasedAfterMonitorCreated(string|DateTimeImmutable $monitorStartDate, array $episodeInShow): bool private function episodeReleasedAfterMonitorCreated(string|DateTimeImmutable $monitorStartDate, array $episodeInShow): bool
{ {
$monitorStartDate = Carbon::parse($monitorStartDate); $monitorStartDate = Carbon::parse($monitorStartDate)->setTime(0, 0);
$episodeAirDate = Carbon::parse($episodeInShow['air_date']); $episodeAirDate = Carbon::parse($episodeInShow['air_date']);
return $episodeAirDate >= $monitorStartDate; return $episodeAirDate >= $monitorStartDate;
} }