From 1939a59a4616b6752473f46a1749074e587f00e0 Mon Sep 17 00:00:00 2001 From: Sandra Kuipers Date: Thu, 5 Sep 2024 11:15:24 +0800 Subject: [PATCH] System: fix incorrect conversion of timestamps into dates when intl is not installed --- src/Services/Format.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Services/Format.php b/src/Services/Format.php index 5cb63d1e61..1d832773a1 100644 --- a/src/Services/Format.php +++ b/src/Services/Format.php @@ -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)