'widget' => 'single_text',
'input' => 'datetime',
]);
$outputTime =
new \
DateTime('2010-06-02 03:04:00 Pacific/Tahiti'
);
$form->
submit('2010-06-02T03:04:00'
);
$outputTime->
setTimezone(new \
DateTimeZone('America/New_York'
));
$this->
assertEquals($outputTime,
$form->
getData());
$this->
assertEquals('2010-06-02T03:04',
$form->
getViewData());
} public function testSubmitDifferentTimezonesDateTimeImmutable() { $form =
$this->factory->
create(static::TESTED_TYPE, null,
[ 'model_timezone' => 'America/New_York',
'view_timezone' => 'Pacific/Tahiti',
'widget' => 'single_text',
'input' => 'datetime_immutable',
]);