第一件事,我可以在其中找到接受的timeZone
值列表?为简单起见我的要求:
{
"timeMin":"2014-01-20T13:00:00+01:00",
"timeMax":"2014-01-20T18:00:00+01:00",
"items":[
{
"id":"XXXXXXX@gmail.com"
},
{
}
],
"timeZone":"Europe/Warsaw"
}
返回错误:
{
"kind":"calendar#freeBusy",
"timeMin":"2014-01-20T12:00:00.000Z",
"timeMax":"2014-01-20T17:00:00.000Z",
"calendars":{
"XXXXXXX@gmail.com":{
"busy":[
{
"start":"2014-01-20T15:30:00+01:00",
"end":"2014-01-20T17:00:00+01:00"
}
]
},
"":{
"errors":[
{
"domain":"global",
"reason":"notFound"
}
],
"busy":[
]
}
}
}
如果我删除了timeZone
属性,则可以返回UTC时间。我有时区名称中的错别字吗?还是Google API错误?
要检查时区,请参见此页面:按国家/地区按时区。它看起来不像错误。您的请求包含空对象。尝试这个请求机构:
{
"timeMin": "2014-01-20T13:00:00+01:00",
"timeMax": "2014-01-20T18:00:00+01:00",
"timeZone": "Europe/Warsaw",
"items":
[
{
"id": "XXXXXXX@gmail.com"
}
]
}
时区Europe/Warsaw
是时区的有效名称。