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(dav): Avoid date diffing if PHP is buggy #41722

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Nov 24, 2023

Summary

PHP<8.1.10 had a bug where the diff of two datetime objects results in garbage. Doing our own date diffing is hard, so we are just hiding the relative date in this specific case.

This is only an issue for Nextcloud because the PHP version shipped with current ubuntu LTS is affected by this.

Screenshots

Before After Unaffected installations before+after
Bildschirmfoto vom 2023-11-24 09-42-34 Bildschirmfoto vom 2023-11-24 09-41-33 image

Before is faked because I don't have the bug locally thanks to a maintained PHP version on Arch.

Checklist

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member Author

/backport to stable28

@ChristophWurst
Copy link
Member Author

/backport to stable27

@ChristophWurst
Copy link
Member Author

/backport to stable26

Copy link
Contributor

@SystemKeeper SystemKeeper left a comment

Choose a reason for hiding this comment

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

Verified with https://3v4l.org/Xc968, looks good to me 👍

@ChristophWurst ChristophWurst merged commit 704326f into master Nov 24, 2023
48 of 50 checks passed
@ChristophWurst ChristophWurst deleted the fix/dav/date-diffing-push-notifications branch November 24, 2023 10:05
@blizzz blizzz mentioned this pull request Mar 5, 2024
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 bug feature: caldav Related to CalDAV internals feature: dav
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Wrong relative time for events in caldav push notifications
4 participants