Daterange filter uses invalid max timestamp for MySQL compatibility
Winter CMS Build
dev-develop
PHP Version
8.4
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
When using the backend Filter widget for date or daterange fields, if only the start date is selected, the filter automatically fills the end date with 2999-12-31 23:59:59. This value exceeds the maximum allowed for MySQL TIMESTAMP fields (2038-01-19 03:14:07), causing SQL errors or data truncation.
Steps to replicate
Steps to Reproduce
- Go to any backend list with a date filter.
- Select only the start date, leaving the end date empty.
- Apply the filter and export or query the data.
- The filter value for the end date will be 2999-12-31 23:59:59.
Expected Behavior
The filter should use the maximum MySQL TIMESTAMP value (2038-01-19 03:14:07) when the end date is not set, to ensure compatibility.
Actual Behavior The filter uses 2999-12-31 23:59:59, which is not compatible with MySQL TIMESTAMP fields.
Workaround
No response
What version of MySQL / MariaDB are you using?
What version of MySQL / MariaDB are you using?
Hi Luke, this: Ver 8.0.43-0ubuntu0.24.04.2