Google日历活动->无效的日期/时间格式:0001-12-28T23:40:36-03:06:28 [英] Google Calendar Event -> Invalid date/time format: 0001-12-28T23:40:36-03:06:28
问题描述
您好Google Calendar API小组,
Hello Google Calendar API team,
我们在使用com.google.api.services.calendar.Calendar.Events.List.execute()
的Google cal feed中收到一个事件,该事件是库google-http-client-1.18.0-rc.jar:1.18.0-rc
无法处理的.您如何建议我们解决此问题?
We receive an event in Google cal feed using com.google.api.services.calendar.Calendar.Events.List.execute()
that the library google-http-client-1.18.0-rc.jar:1.18.0-rc
can't handle. How do you suggest we work around this problem?
{
"kind": "calendar#event",
"etag": "\"2814305416392000\"",
"id": "...",
"status": "confirmed",
...
"created": "2014-08-03T21:47:50.000Z",
"updated": "2014-08-05T01:41:46.086Z",
"summary": "...",
...
"start": {
"dateTime": "0001-12-28T23:40:36-03:06:28" <<<< the issue
},
"end": {
"dateTime": "2014-08-23T21:00:00-03:00"
Caused by: java.lang.NumberFormatException: Invalid date/time format: 0001-12-28T23:40:36-03:06:28
at com.google.api.client.util.DateTime.parseRfc3339(DateTime.java:290) ~[google-http-client-1.18.0-rc.jar:1.18.0-rc]
at com.google.api.client.util.Data.parsePrimitiveValue(Data.java:430) ~[google-http-client-1.18.0-rc.jar:1.18.0-rc]
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:841) ~[google-http-client-1.18.0-rc.jar:1.18.0-rc]
... 21 common frames omitted
推荐答案
我怀疑您的问题是开始日期为0001-12-28T23:40:36-03:06:28
I suspect your problem is that your start date is 0001-12-28T23:40:36-03:06:28
时间,以组合的日期时间值(根据RFC格式设置) 3339).除非明确指定了时区,否则需要一个时区偏移量 在timeZone中指定.
The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified in timeZone.
我会读 RFC 3339 ,但我认为没有任何办法0001为有效年份.
I would read though RFC 3339 but I don't think there is any way that 0001 is a valid year.
If that doesn't fix the problem you could either check the issue log or log it as an issue yourself Google-Calendar-api issues
这篇关于Google日历活动->无效的日期/时间格式:0001-12-28T23:40:36-03:06:28的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!