php-enqueue / enqueue-dev

Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro
https://enqueue.forma-pro.com/
MIT License
2.17k stars 430 forks source link

[Doctrine DBAL] Invalid timestamp of published_at value #1257

Closed andrewprofile closed 2 years ago

andrewprofile commented 2 years ago

https://github.com/php-enqueue/dbal/blob/d6c6d38290415d6383ab156a9cf580a99bd05522/DbalProducer.php#L65

        $publishedAt = null !== $message->getPublishedAt() ?
            $message->getPublishedAt() :
            (int) (microtime(true) * 10000)
        ;

microtime return value in seconds so the conversion to timestamp is invalid, ex : 16551970635236 -> GMT: Monday, 5 July 2494 17:37:15.236

andrewprofile commented 2 years ago

published_at does not represent the date, but the created time in milliseconds.