You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm syncing two sports team calendars from ["webcal://cal.laget.se/AlmtunaISTeam09.ics", "AIS09"] and ["webcal://cal.laget.se/aisungdomteam13.ics", "AIS13"]
I get partial syncs only, the script seems to fail at a particular event in each calendar.
When I sync both calendars in the above order, it fails to sync at this 2 whole-days event from the AIS09 calendar:
BEGIN:VEVENT
CATEGORIES:Övrig aktivitet
DESCRIPTION:\nÖvrig info\nVi anordnar nyårscupen den 2-3 januari 2022. \nD
et är 16 lag anmälda och matcher kommer ske i alla tre hallarna. För att
vi ska få till en sådan bra cup som möjligt behöver alla föräldrar vara m
ed och hjälpa till under dessa dagar! Anmälan avser därför både spelare o
ch föräldrar. \n\nAnmäl er så fort som som möjligt för att underlätta pla
neringen för cupen. \n\nMer info om cupen (anmälda lag mm) kan ni se på c
uponline: https://www.cuponline.se/start.aspx?cupid=35821
DTEND;TZID=W. Europe Standard Time:20220103T235900
DTSTAMP:20211024T155747Z
DTSTART;TZID=W. Europe Standard Time;VALUE=DATE:20220102
LOCATION:Gränby Ishallar
ORGANIZER;CN=Almtuna IS Team 09:
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Nyårscupen
TRANSP:OPAQUE
UID:20220102T000000-20977297@laget.se
END:VEVENT
If I reverse the order of the calenders, sync fails at this event:
with the same error:
GoogleJsonResponseException: API call to calendar.events.insert failed with error: Bad Request
(anonymous) @ Helpers.gs:233
callWithBackoff @ Helpers.gs:882
processEvent @ Helpers.gs:232
(anonymous) @ Code.gs:206
startSync @ Code.gs:205
BEGIN:VEVENT
CATEGORIES:Match
DESCRIPTION:\n\nLäs mer om matchen\nhttps://www.laget.se/aisungdomteam13/D
ivision/Game/473413/8638572
DTEND;TZID=W. Europe Standard Time:20211204T020000
DTSTAMP:20211024T193804Z
DTSTART;TZID=W. Europe Standard Time;VALUE=DATE:20211204
LOCATION:Contigahallen
ORGANIZER;CN=Almtuna IS Team13:
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Match Almtuna IS1 - Norrtälje IK2
TRANSP:OPAQUE
UID:20211204T000000-20928818@laget.se
END:VEVENT
I notice that both events have one thing in common: They start at 00:00 of the day, and their DTSTART string contains DATE:YYYYMMDD, but no time information.
I'm a complete newbee at JavaScript/GoogleScript. But I tried to attach a time to the newEvent startDate as follows:
if (addEventsToCalendar){
if (newEvent.start.date.length = 10){
Logger.log(newEvent.start.date.length)
Logger.log(newEvent);
newEvent.start.date = newEvent.start.date + "T00:00:01"
Logger.log(newEvent);
Logger.log(newEvent.start.date.length)
}
The error message is still there :(
The text was updated successfully, but these errors were encountered:
There are two issues with the events' dtStart/dtEnde values.
You are not supposed to mix VALUE=DATE and VALUE=DATE-TIME
These events have a DATE value type for the "DTSTART" property instead of the default value type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it MUST be specified as a DATE value also.
Values defined as Date are not supposed to have a timezone
This is the label by which a time zone calendar component is referenced by any iCalendar properties whose value type is either DATE-TIME or TIME and not intended to specify a UTC or a "floating" time.
Properly formatted, the first event should look like this:
BEGIN:VEVENT
CATEGORIES:Övrig aktivitet
DESCRIPTION:\nÖvrig info\nVi anordnar nyårscupen den 2-3 januari 2022. \nD
et är 16 lag anmälda och matcher kommer ske i alla tre hallarna. För att
vi ska få till en sådan bra cup som möjligt behöver alla föräldrar vara m
ed och hjälpa till under dessa dagar! Anmälan avser därför både spelare o
ch föräldrar. \n\nAnmäl er så fort som som möjligt för att underlätta pla
neringen för cupen. \n\nMer info om cupen (anmälda lag mm) kan ni se på c
uponline: https://www.cuponline.se/start.aspx?cupid=35821
DTEND;VALUE=DATE:20220104
DTSTAMP:20211024T155747Z
DTSTART;VALUE=DATE:20220102
LOCATION:Gränby Ishallar
ORGANIZER;CN=Almtuna IS Team 09:
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Nyårscupen
TRANSP:OPAQUE
UID:20220102T000000-20977297@laget.se
END:VEVENT
I'm syncing two sports team calendars from ["webcal://cal.laget.se/AlmtunaISTeam09.ics", "AIS09"] and ["webcal://cal.laget.se/aisungdomteam13.ics", "AIS13"]
I get partial syncs only, the script seems to fail at a particular event in each calendar.
When I sync both calendars in the above order, it fails to sync at this 2 whole-days event from the AIS09 calendar:
at these lines:
with this error message in the debugger:
BEGIN:VEVENT
CATEGORIES:Övrig aktivitet
DESCRIPTION:\nÖvrig info\nVi anordnar nyårscupen den 2-3 januari 2022. \nD
et är 16 lag anmälda och matcher kommer ske i alla tre hallarna. För att
vi ska få till en sådan bra cup som möjligt behöver alla föräldrar vara m
ed och hjälpa till under dessa dagar! Anmälan avser därför både spelare o
ch föräldrar. \n\nAnmäl er så fort som som möjligt för att underlätta pla
neringen för cupen. \n\nMer info om cupen (anmälda lag mm) kan ni se på c
uponline: https://www.cuponline.se/start.aspx?cupid=35821
DTEND;TZID=W. Europe Standard Time:20220103T235900
DTSTAMP:20211024T155747Z
DTSTART;TZID=W. Europe Standard Time;VALUE=DATE:20220102
LOCATION:Gränby Ishallar
ORGANIZER;CN=Almtuna IS Team 09:
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Nyårscupen
TRANSP:OPAQUE
UID:20220102T000000-20977297@laget.se
END:VEVENT
If I reverse the order of the calenders, sync fails at this event:
with the same error:
GoogleJsonResponseException: API call to calendar.events.insert failed with error: Bad Request
(anonymous) @ Helpers.gs:233
callWithBackoff @ Helpers.gs:882
processEvent @ Helpers.gs:232
(anonymous) @ Code.gs:206
startSync @ Code.gs:205
BEGIN:VEVENT
CATEGORIES:Match
DESCRIPTION:\n\nLäs mer om matchen\nhttps://www.laget.se/aisungdomteam13/D
ivision/Game/473413/8638572
DTEND;TZID=W. Europe Standard Time:20211204T020000
DTSTAMP:20211024T193804Z
DTSTART;TZID=W. Europe Standard Time;VALUE=DATE:20211204
LOCATION:Contigahallen
ORGANIZER;CN=Almtuna IS Team13:
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Match Almtuna IS1 - Norrtälje IK2
TRANSP:OPAQUE
UID:20211204T000000-20928818@laget.se
END:VEVENT
I notice that both events have one thing in common: They start at 00:00 of the day, and their DTSTART string contains DATE:YYYYMMDD, but no time information.
I'm a complete newbee at JavaScript/GoogleScript. But I tried to attach a time to the newEvent startDate as follows:
The error message is still there :(
The text was updated successfully, but these errors were encountered: