From be7b6101110b16b3d9c1722adbbb9e7c51be0d85 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Fri, 20 Jun 2025 11:46:11 -0500 Subject: [PATCH] fix: monitor tv -> set monitor create date time to 00:00.00 for comparison to air date --- Dockerfile | 1 + src/Monitor/Action/Handler/MonitorTvShowHandler.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f5fe56e..b505e0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM dunglas/frankenphp:php8.4 ENV SERVER_NAME=":80" ENV CADDY_GLOBAL_OPTIONS="auto_https off" ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime" +ENV APP_VERSION="0.0.1" RUN install-php-extensions \ pdo_mysql \ diff --git a/src/Monitor/Action/Handler/MonitorTvShowHandler.php b/src/Monitor/Action/Handler/MonitorTvShowHandler.php index 29934bb..6ea264c 100644 --- a/src/Monitor/Action/Handler/MonitorTvShowHandler.php +++ b/src/Monitor/Action/Handler/MonitorTvShowHandler.php @@ -127,7 +127,7 @@ readonly class MonitorTvShowHandler implements HandlerInterface 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']); return $episodeAirDate >= $monitorStartDate; }