Reputation: 478
I am generating following ics file URL to import into google calendar and when I am trying to import the calendar is imported successfully however the event is not showing in google calendar. I have tried downloading this ics file and then importing into google calendar, for this I am getting message "importing 0 of 1 event" and nothing is shown in the calendar. The same URL is working for Mac calendar. Any idea how to fix this for google calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//SNSNSNS CLOUD//EN
METHOD:PUBLISH
X-WR-CALNAME:Sunny B's Inspections
X-WR-CALDESC:Sunny B's Inspections
BEGIN:VEVENT
DTSTART:20210210T070000Z
DTEND:20210210T073000Z
DTSTAMP;VALUE=DATE-TIME:20210209T123900Z
UID:3
SUMMARY:Test Inspection
DESCRIPTION: test description
LOCATION:
END:VEVENT
UPDATE With Following comment I have changed UID and this is my new .ics file hosed on some URL however when I am importing this file URL in Google calendar it is not showing any event. It is also not syncing any update to events
BEGIN:VCALENDAR
VERSION:2.0
PRODID://TEST CLOUD//EN
METHOD:PUBLISH
X-WR-CALNAME:Sunny B's Inspections
X-WR-CALDESC:Sunny B's Inspections
BEGIN:VEVENT
DTSTART:20210216T060000Z
DTEND:20210216T063000Z
DTSTAMP:20210211T112000Z
UID:dev-fresnoca-inspections-3
SUMMARY:Test Inspection for Cannabis Business Owner Background Form BC-20-6
DESCRIPTION:Inspector: Sunny B | url: http://dev.lvh.me:4200/#/explore/records/17/59
LOCATION:
END:VEVENT
END:VCALENDAR
Upvotes: 1
Views: 2454
Reputation: 5963
Based on RFC 5545 Unique Identifier (UID), the UID MUST be a globally unique identifier.
A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which the identifier was created on the right-hand side of an "@", and on the left-hand side, put a combination of the current calendar date and time of day (i.e., formatted in as a DATE-TIME value) along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number). Using a DATE-TIME value on the left-hand side and a domain name or domain literal on the right-hand side makes it possible to guarantee uniqueness since no two hosts should be using the same domain name or IP address at the same time. Though other algorithms will work, it is RECOMMENDED that the right-hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left-hand side within the scope of that domain.
I tried replacing your UID with a unique identifier and the event was successfully imported.
Sample ICS:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//SNSNSNS CLOUD//EN
METHOD:PUBLISH
X-WR-CALNAME:Sunny B's Inspections
X-WR-CALDESC:Sunny B's Inspections
BEGIN:VEVENT
DTSTART:20210210T070000Z
DTEND:20210210T073000Z
DTSTAMP;VALUE=DATE-TIME:20210209T123900Z
UID:TESTDOMAIN20210210T070000
SUMMARY:Test Inspection
DESCRIPTION: test description
LOCATION:
END:VEVENT
END:VCALENDAR
OUTPUT:
Upvotes: 2