{"action":"created","issue":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/357","labels_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/357/comments","events_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/357/events","html_url":"https://github.com/OfficeDev/ews-java-api/issues/357","id":90930167,"number":357,"title":"How to use setStartTimeZone method of Appointment class?","user":{"login":"pranjaljain","id":10221062,"avatar_url":"https://avatars.githubusercontent.com/u/10221062?v=3","gravatar_id":"","url":"https://api.github.com/users/pranjaljain","html_url":"https://github.com/pranjaljain","followers_url":"https://api.github.com/users/pranjaljain/followers","following_url":"https://api.github.com/users/pranjaljain/following{/other_user}","gists_url":"https://api.github.com/users/pranjaljain/gists{/gist_id}","starred_url":"https://api.github.com/users/pranjaljain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranjaljain/subscriptions","organizations_url":"https://api.github.com/users/pranjaljain/orgs","repos_url":"https://api.github.com/users/pranjaljain/repos","events_url":"https://api.github.com/users/pranjaljain/events{/privacy}","received_events_url":"https://api.github.com/users/pranjaljain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-25T11:03:03Z","updated_at":"2015-08-05T13:06:19Z","closed_at":null,"body":"Hi All,\r\nCan anyone share the code-snippets of using setStartTimeZone() method of Appointment class."},"comment":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/comments/127991861","html_url":"https://github.com/OfficeDev/ews-java-api/issues/357#issuecomment-127991861","issue_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/357","id":127991861,"user":{"login":"itbw","id":13101521,"avatar_url":"https://avatars.githubusercontent.com/u/13101521?v=3","gravatar_id":"","url":"https://api.github.com/users/itbw","html_url":"https://github.com/itbw","followers_url":"https://api.github.com/users/itbw/followers","following_url":"https://api.github.com/users/itbw/following{/other_user}","gists_url":"https://api.github.com/users/itbw/gists{/gist_id}","starred_url":"https://api.github.com/users/itbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itbw/subscriptions","organizations_url":"https://api.github.com/users/itbw/orgs","repos_url":"https://api.github.com/users/itbw/repos","events_url":"https://api.github.com/users/itbw/events{/privacy}","received_events_url":"https://api.github.com/users/itbw/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T13:06:19Z","updated_at":"2015-08-05T13:06:19Z","body":"Hi @pranjaljain  @bhagyagdesai,\r\n\r\na very simple version of using Time Zone will look like follows: \r\n\r\n```\r\n// first  init connection to server\r\nExchangeService service = new ExchangeService();\r\nExchangeCredentials credentials = new WebCredentials(\r\n\t\t\"username\", \"password\");\r\n\r\nservice.setCredentials(credentials);\r\nservice.setUrl(new URI(\"https://hostname/ews/Exchange.asmx\"));\r\n\r\n// Now we can get TimeZoneDefinitions supported by server\r\n// You can just print time zones first, to see which are available\r\nCollection<TimeZoneDefinition> timeZoneDefinitions = service.getServerTimeZones();\r\n\r\n// Select TimeZoneDefinition you need from the collection\r\n// In this example getting time zone by ID\r\n// You can also use name or transition groups and etc.\r\nTimeZoneDefinition timeZoneDefinition = null;\r\nfor (TimeZoneDefinition tzd : timeZoneDefinitions) {\r\n\tif (tzd.getId().equals(\"W. Europe Standard Time\")) {\r\n\t\ttimeZoneDefinition = tzd;\r\n\t}\r\n}\r\n\r\n// TimeZoneDefinition is now can be set to appointment\r\nAppointment appointment = new Appointment(service);\r\nappointment.setSubject(\"TimeZoneTest\");\r\nappointment.setStart(new Date());\r\nappointment.setStartTimeZone(timeZoneDefinition);\r\nappointment.setEnd(new Date());\r\nappointment.setEndTimeZone(timeZoneDefinition);\r\n\r\nappointment.save(WellKnownFolderName.Calendar);\r\n```\r\n\r\nHowever, different versions of Exchange work with time zones in a different way. See following link for more information:\r\nhttps://msdn.microsoft.com/en-US/library/office/Dn789029%28v=EXCHG.150%29.aspx"}}