Bug #81719
closedEpic #77562: Misbehaviors with datetime values and timezones
DateTime comparisons not possible in 8.7
0%
Description
Comparison based custom queries on DateTime values do not work anymore, because they do not get converted correctly in the Typo3DbQueryParser-> createTypedNamedParameter function.
There in line 501
$plainValue = $this->dataMapper->getPlainValue($value);
The value gets always converted to a Unix Timestamp, although in our case DateTime is used in the database and TCA.
The reason for this is, that in the getPlainValue method of the DataMapper, the second parameter "columnMap" is needed to convert the DateTime values to a string correctly.
Is related to #79473
Updated by Riccardo De Contardi almost 7 years ago
- Related to Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fields added
Updated by Uwe Michelfelder almost 7 years ago
Georg Ringer wrote:
closed as duplicate. already solved.
Hi Georg,
I don't see, that the actual type ot the date is taken in account in the latest version.
In line 414 and following there is still no "columnMap" as second parameter provided to the createTypedNamedParameter method:
case QueryInterface::OPERATOR_EQUAL_TO:
if ($value === null) {
$expr = $fieldName . ' IS NULL';
} else {
$placeHolder = $this->createTypedNamedParameter($value);
$expr = $exprBuilder->comparison($fieldName, $exprBuilder::EQ, $placeHolder);
}
break;
If the value is of type DateTime it still gets converted to a unixttimestamp (as a fallback) by createTypedNamedParameter method.
So in my eyes, this bug is not resolved an due to this, DateTime Values cannot be used straigt forward in the database and the extbase repositories methods.
All best,
Uwe
Updated by Georg Ringer almost 7 years ago
- Status changed from Closed to Accepted
Updated by Gerrit Code Review over 5 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58950
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58950
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58950
Updated by Gerrit Code Review over 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58950
Updated by Gerrit Code Review over 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58950
Updated by Markus Klein 10 months ago
- Related to deleted (Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fields)
Updated by Markus Klein 10 months ago
- Is duplicate of Bug #79473: Typo3DbQueryParser fails since Doctrine by comparing date fields added