Skip to content

Commit

Permalink
System: fix incorrect conversion of timestamps into dates when intl i…
Browse files Browse the repository at this point in the history
…s not installed
  • Loading branch information
SKuipers committed Sep 5, 2024
1 parent b30a9aa commit 1939a59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Services/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,9 @@ private static function createDateTime($dateOriginal, $expectedFormat = null, $t
return $dateOriginal;
}

if (is_int($dateOriginal)) {
$expectedFormat = 'U';
if (is_int($dateOriginal) && empty($expectedFormat)) {
$dateOriginal = date('Y-m-d', $dateOriginal);
$expectedFormat = 'Y-m-d';
}

return !empty($expectedFormat)
Expand Down

0 comments on commit 1939a59

Please sign in to comment.