From 51bed6f47caad18302dfaf1924eadc697ab25002 Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Wed, 21 Jul 2021 13:21:48 +0100 Subject: [PATCH] IBX-801: Fixed timezone for DateTime fields in content name pattern #2 --- eZ/Publish/Core/FieldType/DateAndTime/Type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Publish/Core/FieldType/DateAndTime/Type.php b/eZ/Publish/Core/FieldType/DateAndTime/Type.php index 8d5c2a41a8..cbd3569034 100644 --- a/eZ/Publish/Core/FieldType/DateAndTime/Type.php +++ b/eZ/Publish/Core/FieldType/DateAndTime/Type.php @@ -64,7 +64,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin return ''; } - $dt = $value->value; + $dt = clone $value->value; $dt->setTimezone(new DateTimeZone(date_default_timezone_get())); return $dt->format('D Y-d-m H:i:s');