Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timezone property to newly created calendars #886

Closed
wants to merge 3 commits into from

Conversation

tcitworld
Copy link
Member

Closes #223

I didn't add the property on WebCal collections, not sure if applicable, but it's fairly easy to add it too.

Also, I didn't consider the case when someone updates his calendar but the timezone changed since the creation.

Closes #223

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@tcitworld tcitworld added 3. to review Waiting for reviews skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills labels Aug 6, 2018
@tcitworld tcitworld added this to the 1.6.2 milestone Aug 6, 2018
@@ -303,6 +303,10 @@ app.service('CalendarService', function(DavClient, StringUtility, XMLUtility, Ca
name: [DavClient.NS_DAV, 'd:displayname'],
value: name
});
dPropChildren.push({
name: [DavClient.NS_IETF, 'c:calendar-timezone'],
value: TimezoneService.getDetected()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calendar-timezone is supposed to contain the actual VTimezone definition.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@tcitworld
Copy link
Member Author

Not sure if CDATA element is to be used or not (SabreDAV tests has some, but it seems to be badly escaped on PROPFIND response).

I've yet to find a CalDAV client that supports this to test it, can you try this on MacOS/iOS ?

@georgehrke
Copy link
Member

Yes, will do.
Will also check in Charles whether or not macOS uses CDATA when setting the timezone.

@tcitworld
Copy link
Member Author

  • Change failing test
  • Get timezone from settings instead of detecting it

@georgehrke
Copy link
Member

No CDATA:

<A:propertyupdate xmlns:A="DAV:">
	<A:set>
		<A:prop>
			<B:calendar-timezone xmlns:B="urn:ietf:params:xml:ns:caldav">BEGIN:VCALENDAR&#13;
				VERSION:2.0&#13;
				PRODID:-//Apple Inc.//Mac OS X 10.13.6//EN&#13;
				CALSCALE:GREGORIAN&#13;
				BEGIN:VTIMEZONE&#13;
				TZID:Europe/Berlin&#13;
				BEGIN:DAYLIGHT&#13;
				TZOFFSETFROM:+0100&#13;
				RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU&#13;
				DTSTART:19810329T020000&#13;
				TZNAME:CEST&#13;
				TZOFFSETTO:+0200&#13;
				END:DAYLIGHT&#13;
				BEGIN:STANDARD&#13;
				TZOFFSETFROM:+0200&#13;
				RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU&#13;
				DTSTART:19961027T030000&#13;
				TZNAME:CET&#13;
				TZOFFSETTO:+0100&#13;
				END:STANDARD&#13;
				END:VTIMEZONE&#13;
				END:VCALENDAR&#13;</B:calendar-timezone>
		</A:prop>
	</A:set>
</A:propertyupdate>

@georgehrke georgehrke modified the milestones: 1.6.2, 2.0.0 beta2 Sep 8, 2018
@georgehrke
Copy link
Member

Closing in favour of #223 (comment)
Needs to be redone in Vue

@georgehrke georgehrke closed this Sep 13, 2019
@georgehrke georgehrke deleted the add-timezone-property-to-calendars branch September 13, 2019 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a timezone property to calendars.
2 participants