time datetype
dennydanek opened this issue · 1 comments
dennydanek commented
database/src/Database/Helpers.php
Line 223 in 66fbed8
create new \DateInterval
by force can be unwanted.
In case the key is primary - script ends with an exception, because \DateInterval
doesn't have an __toString()
method.
From my perspective would be better to store as string and add a new helper function for creating \DateInterval
from string in Nette/utils
.
Or much complicated way can be create new Class Nette\Utils\DateInterval
exteded of \DateInterval
which contain __toString()
method - but there is a lots of options formating
Thanks for advice
dg commented
I added the option to configure row normalizer to disable conversion of intervals:
$db = new Nette\Database\Connection(...);
$db->setRowNormalizer((new Nette\Database\RowNormalizer)->skipInterval());