mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix format date to mysql on date stream filter (#5825)
* Fix format date to mysql on date stream filter * Update CHANGELOG.md (#5825)
This commit is contained in:
parent
e33a9fad16
commit
a1af6f64f8
@ -4,6 +4,7 @@ HumHub Changelog
|
||||
1.12.1 (Unreleased)
|
||||
----------------------
|
||||
- Fix #5822: Fix content width in mobile view
|
||||
- Fix #5825: Fix format date to mysql on date stream filter
|
||||
|
||||
1.12.0 (July 27, 2022)
|
||||
----------------------
|
||||
|
@ -70,9 +70,10 @@ class DateStreamFilter extends StreamQueryFilter
|
||||
{
|
||||
$localeDateFormat = FormatConverter::convertDateIcuToPhp(Yii::$app->formatter->dateInputFormat);
|
||||
$timeZone = new DateTimeZone(Yii::$app->formatter->timeZone);
|
||||
$dateTime = DateTime::createFromFormat($localeDateFormat, $date, $timeZone);
|
||||
$mysqlDateFormat = 'Y-m-d';
|
||||
|
||||
return DateTime::createFromFormat($localeDateFormat, $date, $timeZone)
|
||||
->format('Y-m-d');
|
||||
return $dateTime ? $dateTime->format($mysqlDateFormat) : date($mysqlDateFormat);
|
||||
}
|
||||
|
||||
private function isFilteredFrom(): bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user