Closed
Description
PHP Version
8.1
CodeIgniter4 Version
4.3.0
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
SQL Server 2019
What happened?
My db expects datetime format like 'd-m-Y H:i:s'
. Unfortunately, the format 'Y-m-d H:i:s'
is hardcoded in several parts of the CI code and trying to insert something into a table with, for example, 'created_at'
column drives me to varchar-to-datetime conversion error.
Steps to Reproduce
Extend CodeIgniter\Model and try to save something to a table with 'created_at'
(or 'updated_at'
) column, without explicitly set that value (doing so leaves BaseModel the task to handle the 'created_at'
column value). The table is hosted in a db with DMY dateformat.
Expected Output
The insertion should work
Anything else?
The discussion started here. Initially, I thought it was only a CodeIgniter Shield problem, but it's not.