my name is Erick and I'm doing an integration with google calendar.
I need to update the information (without changing the date) of a recurring event from a date other than the first, and I need the changes to be applied in the following schedules.
Ex: Recurring scheduling 2020-07-20 through 2020-07-30
change the summary from the 23rd onwards
call PUT
https://www.googleapis.com/calendar/v3/calendars/{{id}}/events/{{event_id}}
{
"summary": "TESTE 123",
"start": {
"dateTime": "2020-07-23T19:00:00",
"timeZone": "America/Sao_Paulo"
},
"end": {
"dateTime": "2020-07-23T20:00:00",
"timeZone": "America/Sao_Paulo"
}, "recurrence":[
"RRULE:FREQ=DAILY;UNTIL=20200730T235959Z;BYDAY=MO,TU,WE,TH,FR,SA"
]
}
The problem is that when doing it, the days 20, 21 and 22 are excluded,
When there is a change of dates I call the PUT and then the POST to create the other schedules, however, in this case there is no change of date and I cannot miss the recurrence.
I really need some help on this issue, this one, thank you
Related
I am trying to import a recurring calendar event using a RRULE plus EXDATE to exclude a date. I thought I had this working a while ago, but it seems to not work any more, at least for this example. The problem is the EXDATE is ignored. See below for sample json. I am trying to exclude the first instance, which begins on June 17, 2019. The date is in Zulu and should match the start date of the event, i.e. 0900 Chicago is 1400 GMT. I have tried including the TZID value of America/Chicago, putting the time in local time (without the Z) and also varying the time up and down by one hour. Google won't budge, the first date is always included in the series. What am I doing wrong?
{
"summary": "Test Meeting 01",
"description": "\n",
"location": "",
"iCalUID": "B8537ED49F7A60558625840A00697C87-Lotus_Notes_Generated-1559329993",
"start": {
"dateTime": "2019-06-17T09:00:00-05:00",
"timeZone": "America/Chicago"
},
"end": {
"dateTime": "2019-06-17T10:00:00-05:00",
"timeZone": "America/Chicago"
},
"recurrence": [
"EXDATE:20190617T140000Z",
"RRULE:FREQ=DAILY;COUNT=3;INTERVAL=1"
],
"attendees": [
],
"visibility": "default"
}
I've been struggling to get EXDATE working too. For me, using local time without TZID or Z worked, i. e.
EXDATE:20190617T090000
for your case.
P.S. This API piece seems really buggy, thus I'll mention that in my case calendar has the same timezone as the event. I do hope, that it does not matter.
I want to create an event in Google Calendar using its API setting the start-end time to be 14:00-15:00 according the calendar's timeZone. Following this reference I can create an appointment but I have to pass dateTime formatted according to RFC3339. It demands to know the offset of the calendar's timeZone.
So following this reference I get the default calendar instance, but it has the name of the timeZone without the offset.
What is the way to create an event on a specific date at 14:00-15:00 according the default calendar's timeZone?
To use the default calendar timezone would be to use Zulu timezone which means it "has no offset from Coordinated Universal Time (UTC)" - +8 UTC , those kind of stuff.
Sample from the Events: insert Try-it:
{
"end": {
"dateTime": "2018-06-15T15:00:00Z"
},
"start": {
"dateTime": "2018-06-15T14:00:00Z"
},
"description": "test"
}
But if in turn, you want to use a specific timezone, remove the Z and add the timeZone property
{
"end": {
"dateTime": "2018-06-15T15:00:00",
"timeZone": "Singapore"
},
"start": {
"dateTime": "2018-06-15T14:00:00",
"timeZone": "Singapore"
},
"description": "Singapore"
}
Hope this small sample helps.
I am trying to create an event using Microsoft Graph API. The thing which is a bit confusing are date type parameters such as start which is of type dateTimeTimeZone which has two properties, dateTime and timeZone.
{
"subject": "Test body event graph api ist 1",
"start": {
"dateTime": "2018-01-09T12:00:00",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2018-01-09T14:00:00",
"timeZone": "India Standard Time"
},
}
For example, I used the above listed values of start and end datetime. That means the event should be created with start date as 9th,January,2018 and time as 12:00:00 pm IST while it should end in 2:00:00 pm IST. However if I look into my calendar the event was scheduled to start at 6:30 am IST and ending at 8:30 am IST. I cannot understand this behaviour. Can someone explain this?
So what does the two parameters dateTime and timeZone specify? What are the valid dateTime accepted formats and does dateTime format needs to match to the timeZone?
Can someone please explain these things?
You can get a list of supported time zones in the beta version of the Graph API:
GET /me/outlook/supportedTimeZones
The value you are using (India Standard Time) is a valid value, so this should work. I just tried it and it worked correctly.
REQUEST
POST /me/events
{
"subject": "Test India Appt",
"start": {
"dateTime": "2018-01-09T12:00:00",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2018-01-09T14:00:00",
"timeZone": "India Standard Time"
}
}
RESPONSE (truncated)
{
...
"originalStartTimeZone": "India Standard Time",
"originalEndTimeZone": "India Standard Time",
...
"subject": "Test India Appt",
...
"start": {
"dateTime": "2018-01-09T12:00:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2018-01-09T14:00:00.0000000",
"timeZone": "India Standard Time"
},
...
}
When you say that you looked at your calendar, how did you do that exactly? Depending on the client you used, the display may have been adjusted to a different time zone.
For example, in the Outlook web client, you set your time zone to a specific one and all events are shown relative to that time zone on your calendar. My test user that I created this appointment with has their time zone set to Pacific Standard Time, so when I look at my calendar, the event I created shows as starting at 10:30 PM on 1/8 and ending at 12:30 AM on 1/9.
Outlook desktop client also shows events relative to the user's time zone, but it uses the time zone of the OS rather than relying on its own setting.
I want to set a monthly recurring event (or reminder) in Google calendar for the last workday (i.e. excluding weekends) before a specific date. For example, if 22 Oct is on Sunday, I want 20 Oct (Friday), but if it's on Tuesday, I want this one.
As a plus, can the holidays be excluded, too?
This would work for the 22nd of every month. RRULE:FREQ=MONTHLY;WKST=MO;BYMONTHDAY=20,21,22;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1
You can do this by setting the correct RRULE for the recurrence.
You can check this related SO post I've answered for creating a recurring "Event every fourth Wednesday in August" and this tutorial : Create a repeating event on last day of each month on Google Calendar for code implementation reference.
{
"summary": "Event Last Day of the Month",
"recurrence": [
"RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1;WKST=MO"
],
"start": {
"dateTime": "2017-08-31T6:00:00",
"timeZone": "timeZone"
},
"end": {
"dateTime": "2017-08-31T7:00:00",
"timeZone": "timeZone"
}
}
Hope this helps.
When I add an recurring event from one timezone, the UNTIL date shows correctly but the events shown are wrong
For example,
{
"end":
{ "dateTime": "2017-09-26T22:10:00", "timeZone": "America/New_York" },
"start":
{ "dateTime": "2017-09-26T21:50:00", "timeZone": "America/New_York" },
"recurrence": [ "RRULE:FREQ=DAILY;UNTIL=20170929;" ],
"summary": "LEAVE. ",
"location": "New Tover"
}
When I add this, it shows till 28 only but not till 29.
If I set it as a day extra, it takes my offset value of timezone and recurring event differs while adding.
For example, if my timezone is Asia/Culcutta, and if i add a recurring event anytime between morning 12am-5:30am, it shows till 30th and other events till 29th. Please help.