diff --git a/eZ/Publish/Core/FieldType/DateAndTime/Type.php b/eZ/Publish/Core/FieldType/DateAndTime/Type.php index 7e8bc72c09..8d5c2a41a8 100644 --- a/eZ/Publish/Core/FieldType/DateAndTime/Type.php +++ b/eZ/Publish/Core/FieldType/DateAndTime/Type.php @@ -14,6 +14,7 @@ use eZ\Publish\SPI\FieldType\Value as SPIValue; use DateInterval; use DateTime; +use DateTimeZone; class Type extends FieldType { @@ -63,7 +64,10 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin return ''; } - return $value->value->format('D Y-d-m H:i:s'); + $dt = $value->value; + $dt->setTimezone(new DateTimeZone(date_default_timezone_get())); + + return $dt->format('D Y-d-m H:i:s'); } /**