File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1356,10 +1356,10 @@ protected function intToDate(int $value)
1356
1356
return $ value ;
1357
1357
1358
1358
case 'datetime ' :
1359
- return date (' Y-m-d H:i:s ' , $ value );
1359
+ return date ($ this -> db -> dateFormat [ ' datetime ' ] , $ value );
1360
1360
1361
1361
case 'date ' :
1362
- return date (' Y-m-d ' , $ value );
1362
+ return date ($ this -> db -> dateFormat [ ' date ' ] , $ value );
1363
1363
1364
1364
default :
1365
1365
throw ModelException::forNoDateFormat (static ::class);
@@ -1382,10 +1382,10 @@ protected function timeToDate(Time $value)
1382
1382
{
1383
1383
switch ($ this ->dateFormat ) {
1384
1384
case 'datetime ' :
1385
- return $ value ->format (' Y-m-d H:i:s ' );
1385
+ return $ value ->format ($ this -> db -> dateFormat [ ' datetime ' ] );
1386
1386
1387
1387
case 'date ' :
1388
- return $ value ->format (' Y-m-d ' );
1388
+ return $ value ->format ($ this -> db -> dateFormat [ ' date ' ] );
1389
1389
1390
1390
case 'int ' :
1391
1391
return $ value ->getTimestamp ();
You can’t perform that action at this time.
0 commit comments