-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[Bug]: Wrong relative time for events in caldav push notifications #41615
Comments
comment from hamza:
I think this method is probably where the problem originates because it joins the event data from apps/dav/lib/CalDAV/CalDavBackend.php:1962 onwards does the expansion for the search |
Observation shows that is is always -1 years, 11months. So it's probably not relative to the first instance of a recurring event but some kind of static value. |
Played with it locally. Events recurring daily and weekly do not cause the bug here. I must be missing something. SELECT * FROM oc_notifications WHERE user = 'admin' AND app = 'dav' AND subject = 'calendar_reminder' could help debug the raw data written for notifications |
Data looks fine {
"title": "Weekly",
"description": null,
"location": null,
"all_day": false,
"start_atom": "2023-11-22T17:30:00+01:00",
"start_is_floating": false,
"start_timezone": "Europe/Vienna",
"end_atom": "2023-11-22T17:45:00+01:00",
"end_is_floating": false,
"end_timezone": "Europe/Vienna",
"calendar_displayname": "Personal"
}
|
It looks very similar to php/php-src#9699 |
https://3v4l.org/IQnhj for a combined view |
@AndyScherzinger @jancborchardt what do you suggest for a workaround if more instances on Ubuntu LTS run into this? Doing date diffing ourself would be a lot of work. As an alternative we could check if the years difference is <0 and then just hide the relative time. |
Could we use the test cases posted above to detect if a faulty PHP version is used and decide with this if we can use relative time or not? |
Good idea! |
I agree
Sounds good to me
Also I also like this one as a way to deal with it |
Bug description
Since #39862 Nextcloud shows push notifications for events. They do not handle recurrence, so an event always shows relative to the first instance, not the next instance. E.g -1 years
Steps to reproduce
Expected behavior
Notifications shows with correct relative time
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: