The expected format for DATE columns is 01-MAR-14. See http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT413
It also works with 01-Mar-2014 as this PR uses.
We found the problem when trying something like
'SELECT * FROM table WHERE datefield > ?',
which was raising an oracle error that the date could not be parsed.
The time format in getTimeFormatString is also wrong because according to the above doc, times can only be passed by using TO_DATE('13-AUG-66 12:56 A.M.','DD-MON-YY HH:MI A.M.').
So this requires wrapping the SQL with a TO_DATE function.
TO_DATE('13-AUG-66 12:56 A.M.','DD-MON-YY HH:MI A.M.')
fix date format on oracle
thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:
We use Jira to track the state of pull requests and the versions they got
You have to use OracleSessionInit to get the date formats right. See the documentation.
I cannot remember anymore why this is necessary but there definitely is a reason for this. I think it's because Doctrine requires some convenient format for date type columns. However this is the way users are handling this kind of problem and we won't be able to change this behaviour anyways in 2.x as it would break users' applications badly. So please bare with me closing this issue. Use the OracleSessionInit listener and it will fix your issue. If you have further question I will help you :)
Thanks for the answer. Is it gonna be fixed in 3.0? Imho it should work out-of-the-box and not require some listeners to be activated manually.