fix: 🐛 Usa UTC per parsare le date in arrivo dall'API
This commit is contained in:
parent
6d8e3f5d27
commit
83d1c1ddd4
|
@ -359,7 +359,7 @@ abstract class Repository extends RestifyRepository
|
|||
static function ($value) {
|
||||
if (is_string($value) && (Carbon::hasFormat($value, 'Y-m-d\TH:i:sP') || Carbon::hasFormat($value, 'Y-m-d\TH:i:s.v\Z'))) {
|
||||
try {
|
||||
return Carbon::parse($value)->format('Y-m-d H:i:s');
|
||||
return Carbon::parse($value, 'UTC')->setTimezone(config('app.timezone'))->format('Y-m-d H:i:s');
|
||||
} catch (InvalidFormatException) {
|
||||
return $value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue