diff --git a/application/Espo/Modules/Crm/Business/Event/Invitations.php b/application/Espo/Modules/Crm/Business/Event/Invitations.php index 6b93452157..f5e96b563f 100644 --- a/application/Espo/Modules/Crm/Business/Event/Invitations.php +++ b/application/Espo/Modules/Crm/Business/Event/Invitations.php @@ -77,14 +77,16 @@ class Invitations case 'datetime': $value = $entity->get($field); if ($value) { - $contents = str_replace($key, $this->dateTime->convertSystemDateTime($value), $contents); + $value = $this->dateTime->convertSystemDateTime($value); } + $contents = str_replace($key, $value, $contents); break; case 'date': $value = $entity->get($field); if ($value) { - $contents = str_replace($key, $this->dateTime->convertSystemDate($value), $contents); + $value = $this->dateTime->convertSystemDate($value); } + $contents = str_replace($key, $value, $contents); break; case 'jsonArray': break;