JavaのGoogle APIクライアントを使用していますが、Googleカレンダーイベントを作成しようとしています。 すでに作成したイベントにログインして取得できます。(Java)イベントを挿入するときのGoogleカレンダー形式のエラー
私はAPIの例を以下してきたと私は次のエラーを取得し、他の同様の質問を見て、まだそれが働いて得ることができませんよ。
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Invalid value for: \"T\" found, can only parse bare date string: 2017-08-31T12:00:00.000-01:00 Have you accidentally used DateTime instead of a Date?",
"reason" : "invalid"
} ],
"message" : "Invalid value for: \"T\" found, can only parse bare date string: 2017-08-31T12:00:00.000-01:00 Have you accidentally used DateTime instead of a Date?"
}
これは私のコードですが、私は」私のDateTimesに文字列を渡す:
DateTime startDate = new DateTime(startData);
EventDateTime start = new EventDateTime();
start.setDate(startDate);
start.setTimeZone("Europe/Stockholm");
DateTime endDate = new DateTime(endData);
EventDateTime end = new EventDateTime();
end.setDate(endDate);
end.setTimeZone("Europe/Stockholm");
Event event = new Event();
event.setDescription(lessons.get(i).getDescription());
event.setStart(start);
event.setEnd(end);
event.setLocation(lessons.get(i).getLocation());
event.setSummary(lessons.get(i).getName())
何が問題なのでしょうか?
あなたはそうです、結局のところ、私は正しく他の答えをチェックしていませんでした。私はこれを非常に疲れていると非難します。この質問を閉じることはできますか? – Melrache
@Melrache、あなたはそのチェックマークをチェックしてこれを答えとしてマークすることで問題を閉じることができます。 – noogui