Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] Inconsistant display in TimeType (array mode) #40997

Copy link
Copy link
Closed
@KDederichs

Description

@KDederichs
Issue body actions

Symfony version(s) affected: 5.2.6 (at least)
Description
When you use the TimeType in forms with the input type set to array and then you set different view_timezone and model_timezone options the conversion will be inconsistant. When you load save it the timezone is correct but when you load it it's off.

How to reproduce

  1. Get a TimeType form field
  2. Set input to array
  3. Set model_timezone to UTC
  4. Set view_timezone to Europe/Berlin
  5. Enter a date and save it to a database
  6. Navigate away and reload that value

Possible Solution
https://github.com/symfony/form/blob/8822890bdb6267f8d1c027f697db4bd83c2afc55/Extension/Core/Type/TimeType.php#L208 is not set like it's in line 193, set it and it will work

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.