{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/6140","repository_url":"https://api.github.com/repos/angular-ui/bootstrap","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/6140/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/6140/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/6140/events","html_url":"https://github.com/angular-ui/bootstrap/issues/6140","id":169300023,"number":6140,"title":"Timezone setting is being ignored by date picker and date picker popup","user":{"login":"weblets","id":2837481,"avatar_url":"https://avatars.githubusercontent.com/u/2837481?v=3","gravatar_id":"","url":"https://api.github.com/users/weblets","html_url":"https://github.com/weblets","followers_url":"https://api.github.com/users/weblets/followers","following_url":"https://api.github.com/users/weblets/following{/other_user}","gists_url":"https://api.github.com/users/weblets/gists{/gist_id}","starred_url":"https://api.github.com/users/weblets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weblets/subscriptions","organizations_url":"https://api.github.com/users/weblets/orgs","repos_url":"https://api.github.com/users/weblets/repos","events_url":"https://api.github.com/users/weblets/events{/privacy}","received_events_url":"https://api.github.com/users/weblets/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/component:%20datepicker-popup","name":"component: datepicker-popup","color":"ffffff"},{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/needs:%20investigation","name":"needs: investigation","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-04T06:24:49Z","updated_at":"2016-08-11T13:33:27Z","closed_at":null,"body":"### Bug description:\r\n\r\nI tried to have the date picker popup display and handle a different timezone but it seems that this does not work.\r\nThe root problem is, ng-model-options=\"{timezone: 'any timezone setting'}\" does not seem to have any effect on the resulting date. Also today and maxDate and minDate seem to adjust themselves still on the local browser timezone.\r\n\r\nI have attached a plunker example which shows the problem.\r\n\r\nI basically worked around all this with a set of decorators which fixes most core problems (aka the parser for instance does not take the timezone into account, comparisons only compare dates not time etc...)\r\nBut for one thing I had to fix the code itself, for the popup the ng-model-options timezone is reset to zero thus resulting in the display of selected date and today always for the local timezone not the one set in the model options.\r\n\r\nhttps://gist.github.com/weblets/1eb834783f7e1d1138b83ec430a252aa\r\n\r\nThis links to a code snippet with the affecting line documented. I am not entirely sure what sideffects we get if we leave the timezone in instead of nulling it in a non decorated scenario. I have to perform further tests on this in a standard non decorated environment. But the timezone ignoring problem is deeper it also is in the parser etc... So fixing this line alone wont help.\r\n\r\n\r\n### Link to minimally-working plunker that reproduces the issue:\r\nHere is a plunker which demonstrates the general problem of the timezone being ignored.\r\nYou have to be out of GMT+2 to see the problem of both input fields (one with timezone setting and one without showing a local date and producing the same results)\r\n\r\nhttp://plnkr.co/edit/bAz3swqtE9HRLMJFjKIo?p=preview\r\n\r\n### Version of Angular, UIBS, and Bootstrap\r\nAngular:  1.5.5\r\nUIBS:  2.0.1\r\nBootstrap:  3.3.6\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/239161745","html_url":"https://github.com/angular-ui/bootstrap/issues/6140#issuecomment-239161745","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/6140","id":239161745,"user":{"login":"joseph-etorne","id":13018024,"avatar_url":"https://avatars.githubusercontent.com/u/13018024?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-etorne","html_url":"https://github.com/joseph-etorne","followers_url":"https://api.github.com/users/joseph-etorne/followers","following_url":"https://api.github.com/users/joseph-etorne/following{/other_user}","gists_url":"https://api.github.com/users/joseph-etorne/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-etorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-etorne/subscriptions","organizations_url":"https://api.github.com/users/joseph-etorne/orgs","repos_url":"https://api.github.com/users/joseph-etorne/repos","events_url":"https://api.github.com/users/joseph-etorne/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-etorne/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T13:33:27Z","updated_at":"2016-08-11T13:33:27Z","body":"I am also having problems with **ng-model-options=\"{timezone: '+0000'}\"**.  when selecting a new date, it should get the date and time in UTC, instead i get the local date and time.  This only happens in versions 2.0.0 and 2.0.1.  I tried version 1.3.3 and it's working fine"}}
{"actor":{"display_login":"joseph-etorne"}}