API: how to set timezone

API: how to set timezone

Hi,

I'm currently trying to figure out how to use your Site API. Was successful to some extend, but one thing I just could not figure out: how to set the timeZone via the API. No matter what I try, there is no value selected when viewing the site in SD+. After selecting some timezone in SD+ and saving saving in SD+, the timezone is saved.

So what do I have to use?

What I tried:

- "value" field of the SD+ select box (e.g. "301" for Europe/Berlin)
- the complete string of the SD+ select box (e.g. "(GMT+1:00) Central European Summer Time(Europe/Berlin)*" or "(GMT+1:00) Central European Summer Time(Europe/Berlin)"
- the "location" itself (e.g. "Europe/Berlin")

nothing worked. I tried various approaches with a) using CURL and b) just using your provided sample form (and exchanging the URL of course).

The API documentation also says nothing but "Time Zone of the site" (no way!)

Whatever I pass as "timeZone" results in following log entries (excerpt):

[10:28:58:939]|[09-30-2011]|[SYSOUT]|[INFO]|[46]|: java.lang.StringIndexOutOfBoundsException: String index out of range: -2|                                                                        
[10:28:58:939]|[09-30-2011]|[SYSOUT]|[INFO]|[46]|:      at java.lang.String.substring(Unknown Source)|
[10:28:58:939]|[09-30-2011]|[SYSOUT]|[INFO]|[46]|:      at com.adventnet.servicedesk.servlet.site.SiteHandler.handleSiteOperation(SiteHandler.java:161)|
[10:28:58:939]|[09-30-2011]|[SYSOUT]|[INFO]|[46]|:      at com.adventnet.servicedesk.servlet.site.SiteOperationServlet.doPost(SiteOperationServlet.java:54)|















                  New to ADSelfService Plus?