Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doctrine DBAL] Invalid timestamp of published_at value #1257

Closed
andrewprofile opened this issue Jun 14, 2022 · 1 comment
Closed

[Doctrine DBAL] Invalid timestamp of published_at value #1257

andrewprofile opened this issue Jun 14, 2022 · 1 comment

Comments

@andrewprofile
Copy link

andrewprofile commented Jun 14, 2022

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 added a commit to andrewprofile/enqueue-dev that referenced this issue Jun 14, 2022
@andrewprofile
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant