EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Fix dateTime in template
Yurii3e6598d03632
diff --git a/application/Espo/Core/Htmlizer/Htmlizer.php b/application/Espo/Core/Htmlizer/Htmlizer.phpindex fbfd37fe3c..348614d585 100644--- a/application/Espo/Core/Htmlizer/Htmlizer.php+++ b/application/Espo/Core/Htmlizer/Htmlizer.php@@ -441,14 +441,7 @@ class Htmlizer$timezone = $context->hash['timezone'] ?? null;$language = $context->hash['language'] ?? null;- $rootData = $context->data['root'];-- $dateTime = $rootData['__dateTime'];-- /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */- if (!$dateTime instanceof \Espo\Core\Utils\DateTime) {- throw new RuntimeException();- }+ $dateTime = $this->dateTime;if (strlen($dateValue) > 11) {return $dateTime->convertSystemDateTime($dateValue, $timezone, $format, $language);