Skip to content

Commit

Permalink
IBX-801: Fixed timezone for DateTime fields in content name pattern #2
Browse files Browse the repository at this point in the history
  • Loading branch information
SerheyDolgushev committed Jul 21, 2021
1 parent eed4480 commit 51bed6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eZ/Publish/Core/FieldType/DateAndTime/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 51bed6f

Please sign in to comment.