{"action":"opened","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/16518","labels_url":"https://api.github.com/repos/symfony/symfony/issues/16518/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/16518/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/16518/events","html_url":"https://github.com/symfony/symfony/issues/16518","id":116148653,"number":16518,"title":"[Form] Passing timezone settings from DateTimeType to DateType through model_timezone option","user":{"login":"hisamu","id":194708,"avatar_url":"https://avatars.githubusercontent.com/u/194708?v=3","gravatar_id":"","url":"https://api.github.com/users/hisamu","html_url":"https://github.com/hisamu","followers_url":"https://api.github.com/users/hisamu/followers","following_url":"https://api.github.com/users/hisamu/following{/other_user}","gists_url":"https://api.github.com/users/hisamu/gists{/gist_id}","starred_url":"https://api.github.com/users/hisamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hisamu/subscriptions","organizations_url":"https://api.github.com/users/hisamu/orgs","repos_url":"https://api.github.com/users/hisamu/repos","events_url":"https://api.github.com/users/hisamu/events{/privacy}","received_events_url":"https://api.github.com/users/hisamu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T16:48:29Z","updated_at":"2015-11-10T16:48:29Z","closed_at":null,"body":"I came across an issue with daylight saving timezones where the day which changes the time is handled as a invalid date in PHP.\r\n\r\nSince my form had a `DateType` field, I managed to fix this issue by setting both `model_timezone` and `view_timezone` to UTC. The same issue happened on a `DateTimeType` field, but setting the options didn't solve the error.\r\n\r\nLooking further at the code, I realized that there's specific options been passed to the new `DateType` field created, and the timezone options aren't. This is the specific piece of code: https://github.com/symfony/symfony/blob/2.6/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php#L113\r\n\r\nAdding `model_timezone` and `view_timezone` to this array solved my problem.\r\n\r\nAm I missing something here, or this options should be passed to the `DateType` field?"}}