The date functions used in the MysqlQueryBuilder are copied from the SqliteQuerybuilder but don't work with mysql:
- sprintf("datetime(`%s`) %s strftime('%s', '%s')", $propertyName, $comparator, '%Y-%m-%d %H:%M:%S', $propertyValue->format('Y-m-d H:i:s'));
+ sprintf("`%s` %s str_to_date('%s', '%s')", $propertyName, $comparator, $propertyValue->format('Y-m-d H:i:s'), '%Y-%m-%d %H:%i:%S');
str_to_date takes the format as the second argument and minutes are %i.
Unfortunately I don't see a good solution for the first datetime call, as the format depends on the indexing configuration on the property. In my tests I got the impression that there is some implicit type conversion happening, but I'm not sure if that's really what's going on.
The date functions used in the
MysqlQueryBuilderare copied from theSqliteQuerybuilderbut don't work with mysql:str_to_datetakes the format as the second argument and minutes are%i.Unfortunately I don't see a good solution for the first
datetimecall, as the format depends on the indexing configuration on the property. In my tests I got the impression that there is some implicit type conversion happening, but I'm not sure if that's really what's going on.