Skip to content

DateTimeToLocalizedStringTransformer ignoring time during reverse transform between timezones #20806

@rcwsr

Description

@rcwsr

Updating from symfony v2.8.9 to v.2.8.10 one of my project's tests has started to fail, it looks like it was introduced here c951bb6

I'm not entirely sure if it's a bug with symfony or my project, as it looks like that commit purposely ignores datetime strings without a time.

I have reproduced my project's failing test in DateTimeToLocalizedStringTransformerTest: rcwsr@f605b85

1) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformerTest::testReverseTransformDateWithoutTime
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'1420088400'
+'1420070400'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions