Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing End Time Google Calendar

Here is my google calendar request. In the response, the error code is "Missing End Time." I'm trying to make this dynamic, so I will end up removing the hard coded start and end dateTimes.

var object = {
        "end": {
            'dateTime': "2014-07-28T23:00:00",//end,
            "timeZone": timeZone
        },
        "start": {
            'dateTime': "2014-07-28T18:00:00",//start,
            "timeZone": timeZone
        },
        "calendarId": calendarId,
        "summary": artist,
        "description": description,
        "location": address
    };
    var request = gapi.client.calendar.events.insert(object);
like image 239
theB3RV Avatar asked Jul 28 '14 07:07

theB3RV


People also ask

When do all-day events end in Google Calendar?

All-day events in Google Calendar end at midnight on the last day, so they're exclusive of the end date. For example, an event created via Zapier for August 10 - August 15 will appear to span August 10 - August 14 in Google Calendar, because the event will end at 12:00:00 on August 15.

How to fix Google Calendar not synchronizing?

Follow the steps below to clear cache and enable smooth synchronization. Step 1: Go to the Settings on your phone. Step 2: Click on the Apps option from the menu. Step 3: Choose Google Calendar from the Apps list. Step 4: Click on the Storage option. Step 5: Click on the buttons Clear Data and Clear Cache.

How do I edit a Google Calendar?

Step 1: Go directly to your Google calendar. Step 2: Choose any event and edit it in any way, even if it means just adding a letter to the description or the event title. Step 3: Save the edited event and press Command + R to refresh your calendar. The calendar should now show the event.

Why can't I see the summary of a Google Calendar?

If the calendar doesn't belong to you or hasn't been shared with you, Google will not provide the Summary or Description fields. To fix this, have the owner share the calendar with you (even if it's already public). Why aren't repeated events triggering? Repeated events in Google Calendar aren't supported with the New Eventtrigger in Zapier.


2 Answers

This guy had the answer

https://groups.google.com/forum/#!msg/google-calendar-api/cnkgXfy_GQQ/SRV1N0TAGtYJ

    var object = {
        'end': {
            'dateTime': '2014-07-28T23:00:00',//end,
            'timeZone': timeZone
        },
        'start': {
            'dateTime': '2014-07-28T18:00:00',//start,
            'timeZone': timeZone
        }
        //'summary': artist,
        //'description': description,
        //'location': address
    };
    var calendarObject =
    {
        'calendarId': calendarId,
        'resource': object
    };
    var request = gapi.client.calendar.events.insert(calendarObject);
like image 193
theB3RV Avatar answered Oct 02 '22 10:10

theB3RV


Probably, the reason of this error not wrong time. Probably, Calendar API can't recognize you json. Header of http-request MUST contain "Content-Type: application/json". See here http://devsplanet.com/question/37535563

like image 44
segreb Avatar answered Oct 02 '22 08:10

segreb