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

Fix all day events bleeding over to following day: #407

Merged
merged 3 commits into from
May 24, 2024

Conversation

MelissaAutumn
Copy link
Member

  • Google defines all day as "Midnight" to "Midnight + 1 day"
  • Subtract 1 minute from the end time.

Fixed:
image

Sample all day event:

{
	"11": {
		"title": "Test All Day",
		"start": "2024-05-10T00:00:00",
		"end": "2024-05-11T00:00:00",
		"all_day": true,
		"tentative": false,
		"description": "",
		"calendar_title": "<redacted>",
		"calendar_color": "#9fe1e7",
		"location": null,
		"uuid": null
	}
}

* Google defines all day as "Midnight" to "Midnight + 1 day"
* Subtract 1 minute from the end time.
@MelissaAutumn MelissaAutumn requested a review from devmount May 10, 2024 21:53
@MelissaAutumn MelissaAutumn self-assigned this May 10, 2024
Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

Good catch! Works for Google, but not for CalDAV it seems?

image

@MelissaAutumn
Copy link
Member Author

MelissaAutumn commented May 13, 2024

Do you have a sample dump of what that calendar event looks like in ical?

Fastmail seems to use Duration instead of setting an end time (which we don't actually handle, so that fix is coming up!) which functionally works like Google.

@devmount
Copy link
Collaborator

devmount commented May 13, 2024

This is the dump:

BEGIN:VEVENT
CREATED:20240513T080055Z
LAST-MODIFIED:20240513T080115Z
DTSTAMP:20240513T080115Z
UID:cg9ce9g7-arhe-o5li-47jh-2rqa03fyca1j
SUMMARY:AllDayTest
DTSTART;VALUE=DATE:20240514
DTEND;VALUE=DATE:20240515
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT

I used some random public test caldav server, so this might just be a weird implementation on server side. They obviously use all day events with excluded DTEND.

I will do some more testing on this.

@devmount
Copy link
Collaborator

devmount commented May 24, 2024

I was able to reproduce this bug with a NextCloud CalDAV calendar. Here is the dump from the NExtCloud CalDAV event:

BEGIN:VEVENT
CREATED:20240524T130454Z
DTSTAMP:20240524T130503Z
LAST-MODIFIED:20240524T130503Z
SEQUENCE:2
UID:a6bc4c05-8feb-4b7c-aed5-111cb75d1bf3
DTSTART;VALUE=DATE:20240528
DTEND;VALUE=DATE:20240529
STATUS:CONFIRMED
SUMMARY:CalDAV TEST
END:VEVENT

Working on a fix.

Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

Ok I don't know what I did wrong, but it suddenly works for all my CalDAV calendars 🙈 I guess my frontend container was in a weird state. When checking out that branch again and restarting the containers, it works now 😇

So your fix totally works for CalDAV too, sorry for this! At least we know now that Appointment supports Nextcloud calendars too 😅

@MelissaAutumn MelissaAutumn merged commit dc5d179 into main May 24, 2024
@MelissaAutumn MelissaAutumn deleted the bugs/406-all-day-events-bleed branch May 24, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants