-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
After merge issue above, there is bug on the DateTimeType::class form type - DateTimeToLocalizedStringTransformer class on branch master.
My timezone is Europe/Warsaw, +2h from UTC timezone.
Part of form:
$builder->add(
'publishDateEnd',
DateTimeType::class,
[
'required' => false,
'widget' => 'single_text',
'format' => 'dd.MM.yyyy HH:mm',
'attr' => [
'placeholder' => 'dd.mm.yyyy HH:mm',
],
]
When for example publishDateEnd is set as 2016-08-01 10:00:00 and I set in the web form date as 2016-08-01 12:00:00, after save form date back to 2016-08-01 10:00:00. Should be saved as 2016-08-01 12:00:00.
When I add 'view_timezone' => 'UTC' into widget option, date is display as correct date, but is invalid in database
My php.ini timezone is set as Europe/Warsaw