Closed fahamjv closed 5 years ago
You must store datatime as Gregorian calendar type, use jalali calendar only for displaying in views or reports. for example:
$product->created_at = jDateTime::createCarbonFromFormat('Y-m-d H:i:s', '1397-06-23 11:45:30');
$product->save();
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1397-06-23 11:45:30' for column 'updated_at' at row 1 (SQL: update
products
setupdated_at
= 1397-06-23 11:45:30 whereid
= 26)and i don't wanna change the timestamp type to datetime in my table