Commit 38508052 authored by Andreas Fischer's avatar Andreas Fischer

Document possible Sqlite datetime issues.

parent 390db30f
......@@ -73,6 +73,22 @@ type therefore behave like the DateTime type.
Sqlite
------
DateTime
~~~~~~~~~~
Unlike most database management systems, Sqlite does not convert supplied
datetime strings to an internal storage format before storage. Instead, Sqlite
stores them as verbatim strings (i.e. as they are entered) and expects the user
to use the ``DATETIME()`` function when reading data which then converts the
stored values to datetime strings.
Because Doctrine is not using the ``DATETIME()`` function, you may end up with
"Could not convert database value ... to Doctrine Type datetime." exceptions
when trying to convert database values to ``\DateTime`` objects using
.. code-block:: php
\Doctrine\DBAL\Types\Type::getType('datetime')->convertToPhpValue(...)
DateTimeTz
~~~~~~~~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment