diff --git a/composer.json b/composer.json index 63a25e287..112a53c85 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "miljar/php-exif": "^0.6.4", "nelexa/zip": "^3.3 || ^4.0", "nelmio/cors-bundle": "^2.1", - "nesbot/carbon": "^2.53", + "nesbot/carbon": "^3.8", "pagerfanta/doctrine-orm-adapter": "^4.7", "php-translation/symfony-bundle": "^0.15", "phpdocumentor/reflection-docblock": "^5.3", diff --git a/src/Event/Subscriber/TimedPublishSubscriber.php b/src/Event/Subscriber/TimedPublishSubscriber.php index 6374f74b0..4804b40e2 100644 --- a/src/Event/Subscriber/TimedPublishSubscriber.php +++ b/src/Event/Subscriber/TimedPublishSubscriber.php @@ -37,7 +37,7 @@ public function __construct($tablePrefix, ManagerRegistry $managerRegistry) public function onKernelRequest(): void { $conn = $this->defaultConnection; - $now = (new Carbon())->tz('UTC'); + $now = new Carbon(null, 'UTC'); // Publish timed Content records when 'publish_at' has passed and Depublish published Content // records when 'depublish_at' has passed. Note: Placeholders in DBAL don't work for tablenames.