-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] - formatDateTime is not correct in oracle #32427
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
Comments
Ping @vincenttouzet! What is the |
@weaverryan Hum It's an old habit that I have. The T is part of the ISO 8601 DateTime format. But I think we can get rid of it in that case. |
If we use the database platform, I think we can entirely allow doctrine to handle this anyways :) |
… DateTime (roukmoute) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] use database platform to convert correctly the DateTime | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes | Fixed tickets | #32427 | License | MIT In Doctrine Messenger the method `\Symfony\Component\Messenger\Transport\Doctrine\Connection::formatDateTime()` is used to format dateTime into this: `Y-m-d\TH:i:s`. But this is not supported in all databases platform. Here we use the database platform to convert correctly the dateTime. Commits ------- cfa1156 Format DateTime depending on database platform
… DateTime (roukmoute) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] use database platform to convert correctly the DateTime | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes | Fixed tickets | symfony/symfony#32427 | License | MIT In Doctrine Messenger the method `\Symfony\Component\Messenger\Transport\Doctrine\Connection::formatDateTime()` is used to format dateTime into this: `Y-m-d\TH:i:s`. But this is not supported in all databases platform. Here we use the database platform to convert correctly the dateTime. Commits ------- cfa11561d1 Format DateTime depending on database platform
Closed this in #32456 |
… DateTime (roukmoute) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] use database platform to convert correctly the DateTime | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes | Fixed tickets | symfony/symfony#32427 | License | MIT In Doctrine Messenger the method `\Symfony\Component\Messenger\Transport\Doctrine\Connection::formatDateTime()` is used to format dateTime into this: `Y-m-d\TH:i:s`. But this is not supported in all databases platform. Here we use the database platform to convert correctly the dateTime. Commits ------- cfa11561d1 Format DateTime depending on database platform
Symfony version(s) affected: 4.3.1
Description
ORA-01858: a non-numeric character was found where a numeric was expected
How to reproduce
Implement Messenger with Oracle
Possible Solution
If we remove
\T
from$dateTime->format('Y-m-d\TH:i:s');
in\Symfony\Component\Messenger\Transport\Doctrine\Connection::formatDateTime
, it works.I think it is a special things from Oracle, is there any specifity for format datime in relation to the database?
Could we use
\Doctrine\DBAL\Types\DateTimeType
instead?Additional context

The text was updated successfully, but these errors were encountered: