<p dir="auto">When using the Symfony Form Type "time", e.g.</p>
<p dir="auto"><code class="notranslate">$builder-&gt;-&gt;add('fromTime', 'time', [ 'widget' =&gt; 'choice', 'attr' =&gt; ['class' =&gt; 'form-control'], 'model_timezone' =&gt; "UTC", 'view_timezone' =&gt; "Europe/Berlin" ])</code></p>
<p dir="auto">The "reverseTransform" in "DateTimeToArrayTransformer" converts the form input back to the model_timezone. Since there is only an "hour" and "minutes" input, the method uses the year 1970 as a helper to create the date object.</p>
<p dir="auto"><code class="notranslate">$dateTime = new \DateTime(sprintf( '%s-%s-%s %s:%s:%s %s', empty($value['year']) ? '1970' : $value['year'], empty($value['month']) ? '1' : $value['month'], empty($value['day']) ? '1' : $value['day'], empty($value['hour']) ? '0' : $value['hour'], empty($value['minute']) ? '0' : $value['minute'], empty($value['second']) ? '0' : $value['second'], $this-&gt;outputTimezone ))</code></p>
<p dir="auto">And afterwards is converted to the inputTimezone (model_timezone). Unfortunately, it produces unexpected results:<br>
E.g. "1970-01-01 12:45:00" is converting to "1970-01-01 11:45:00", which is wrong (and somehow right at the same time). And here is the reason - in 1970, there was no daylight saving time in this timezone, so there is only a +1 difference between "UTC" and "Europe/Berlin". Now, there should be a +2 hours difference.</p>
<p dir="auto">This generally applies to dates out of the daylight saving times.</p>
<p dir="auto">Proposed fix: Instead of 1970-01-01, the current year / month / day should be used in the transformer, if no input date was specified. But I must confess, that both versions lead to unexpected behavior which is not ideal.</p>
<p dir="auto">As discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11396161" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/7187" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/7187/hovercard" href="https://github.com/symfony/symfony/issues/7187">#7187</a>, these options don't make sense for these types.</p>