fix: monitor tv -> set monitor create date time to 00:00.00 for comparison to air date
This commit is contained in:
@@ -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 \
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user