This commit is contained in:
James Cole
2025-08-20 10:13:23 +02:00
parent 46219c4678
commit 6ddda13c3a
6 changed files with 16 additions and 12 deletions

View File

@@ -255,7 +255,7 @@ trait ConvertsDataTypes
if (10 === strlen((string) $value)) {
// probably a date format.
try {
$carbon = Carbon::createFromFormat('Y-m-d', $value);
$carbon = Carbon::createFromFormat('Y-m-d', $value,config('app.timezone'));
} catch (InvalidDateException $e) { // @phpstan-ignore-line
Log::error(sprintf('[1] "%s" is not a valid date: %s', $value, $e->getMessage()));
@@ -276,7 +276,7 @@ trait ConvertsDataTypes
// is an atom string, I hope?
try {
$carbon = Carbon::parse($value);
$carbon = Carbon::parse($value, $value,config('app.timezone'));
} catch (InvalidDateException $e) { // @phpstan-ignore-line
Log::error(sprintf('[3] "%s" is not a valid date or time: %s', $value, $e->getMessage()));