symfony/symfony — pull request #6333 by bschussek (2012-12-13 18:14:05+00:00)
Title: [Form] Fixed reverse transformation of values in DateTimeToStringTransformer

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing

"2012-05-18"

now results in the date

"2012-05-18 00:00:00 UTC"

instead of

"2012-05-18 12:58:27 UTC"

as before, where the time part corresponded to the local server time.

Another example: When parsing with the format "H:i:s", parsing

"12:58:27"

now results in

"1970-01-01 12:58:27 UTC"

instead of

"2012-12-13 12:58:27 UTC"

as before, where again the date part corresponded to the local server time.

This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.