8000 [Form] Remove timezone options from DateType and TimeType by jakzal · Pull Request #4417 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Form] Remove timezone options from DateType and TimeType #4417

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

Closed
wants to merge 3 commits into from
Closed

[Form] Remove timezone options from DateType and TimeType #4417

wants to merge 3 commits into from

Conversation

jakzal
Copy link
Contributor
@jakzal jakzal commented Nov 3, 2014
Q A
Doc fix? yes
New docs? no
Applies to 2.6+
Fixed tickets -

re symfony/symfony#12404

@xabbuh
Copy link
Member
xabbuh commented Nov 3, 2014

We also need to remove it from the BirthdayType.

@jakzal
Copy link
Contributor Author
jakzal commented Nov 3, 2014

@xabbuh good spot

@xabbuh
Copy link
Member
xabbuh commented Nov 4, 2014

@jakzal I guess the note would be useful for the BirthdayType too. What do you think?

fabpot added a commit to symfony/symfony that referenced this pull request Nov 16, 2014
…ype (jakzal)

This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #12404).

Discussion
----------

[Form] Remove timezone options from DateType and TimeType

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12239
| License       | MIT
| Doc PR        | symfony/symfony-docs#4417

replaces #12380

Commits
-------

849fb29 Drop support for model_timezone and view_timezone options in TimeType and DateType.
@xabbuh
Copy link
Member
xabbuh commented Nov 16, 2014

Code pull request has been merged.

@xabbuh
Copy link
Member
xabbuh commented Jan 2, 2015

I wish you a happy 2015 @jakzal! Can you update the pull request to also apply the note to the BirthdayType?

@wouterj @weaverryan Should we consider to merge this into the 2.3 branch given that people otherwise would break their applications when they used these options and update to Symfony 2.6?

@weaverryan
Copy link
Member

Hi guys!

We should also add an entry to the UPGRADE-2.6.md file in the symfony repo. I'm doing that now (symfony/symfony#13224), but I need some help, because I don't quite understand what to tell people.

If I were previously using one of these options, what should I do now? Is the difference that before, we would use model_timezone to convert the DateTime object, then view_timezone to convert it again to show the user? So for example, if I have a datetime stored in UTC in the database, I would previously have set model_timezone to UTC. Then, if I want my users to select the time in US Eastern, I might set view_timezone to America/New_York. Is that right? So with these options gone, is it correct to say that it is my responsibility to convert my DateTime object (from the database) to a US Eastern DateTime, and then convert it back on submit to UTC? Or am I over-thinking this?

@xabbuh I think we should pretend like these options were deprecated in 2.3, and add deprecations notices in 2.3.

Thanks!

P.S. @jakzal can you delete the view_timezone.rst.inc and model_timezone.rst.inc files?

@jakzal
Copy link
Contributor Author
jakzal commented Jan 5, 2015

Sorry for delay. I'll update this PR in the evening.

@jakzal
Copy link
Contributor Author
jakzal commented Jan 5, 2015

Unless #4763 replaces this PR?

@xabbuh
Copy link
Member
xabbuh commented Jan 5, 2015

@jakzal I suggest to wait for the final decision on the code repository and based on this merge one or the other. Does that make sense to you?

@jakzal
Copy link
Contributor Author
jakzal commented Jan 5, 2015

Yept. Thanks.

@fabpot
Copy link
Member
fabpot commented Jan 6, 2015

We are going to revert the change as per symfony/symfony#13241

@xabbuh
Copy link
Member
xabbuh commented Jan 11, 2015

Going to close here then. Anyway, thanks for the pull request @jakzal.

@xabbuh xabbuh closed this Jan 11, 2015
@jakzal jakzal deleted the remove-timezone-options-master branch January 11, 2015 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0