Skip to content

[Form] add back model_timezone and view_timezone options #13241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 4, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #13224
License MIT
Doc PR symfony/symfony-docs#4763 TODO (deprecate the model_timezone and view_timezone options)

This reverts #12404.

@xabbuh
Copy link
Member Author

xabbuh commented Jan 4, 2015

I think passing the actual value of model_timezone or view_timezone to the data transformer is not really needed. If I am not mistaken we can rely on the fix from #12911 and simply ignore these options.

@xabbuh
Copy link
Member Author

xabbuh commented Jan 4, 2015

Failures don't seem to be related to this change afaics.

@fabpot
Copy link
Member

fabpot commented Jan 6, 2015

I'd like to merge this one fast to be able to release 2.6.2. Everything's ok?

@fabpot
Copy link
Member

fabpot commented Jan 6, 2015

ping @symfony/deciders


$form->setData('2010-06-02');

$this->assertEquals('01.06.2010', $form->getViewData());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular test shows the two problematic options are pointless and might be misleading in case of Date/Birthday/Time types. It doesn't matter in which timezone a person was born, changing a timezone shouldn't change a date of birth.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said it's hard to believe that anyone using these types has relied on date being shifted in certain scenarios. I'd rather treat it as a bug.

I think it's fine to bring the options back and ignore them. We shouldn't suggest in the readme they're supported though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you then suggest to remove these tests and the entry I made to the changelog here?

@fabpot
Copy link
Member

fabpot commented Jan 7, 2015

I'm going to merge this one today to be able to release 2.6.2. Any other feedback before the merge?

@fabpot
Copy link
Member

fabpot commented Jan 7, 2015

Thank you @xabbuh.

@fabpot fabpot merged commit 1c4a75a into symfony:2.6 Jan 7, 2015
fabpot added a commit that referenced this pull request Jan 7, 2015
…ns (xabbuh)

This PR was merged into the 2.6 branch.

Discussion
----------

[Form] add back model_timezone and view_timezone options

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13224
| License       | MIT
| Doc PR        | TODO (deprecate the `model_timezone` and `view_timezone` options)

This reverts #12404.

Commits
-------

1c4a75a add back model_timezone and view_timezone options
@xabbuh xabbuh deleted the revert-12404 branch January 7, 2015 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants