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)