Open ChristophWurst opened 1 year ago
The reminder itself could contain a proper DATE-TIME value with a timezone:
@miaulalala How would we implement it for relative alarms? Just save them as absolute reminders for all-day events?
Fixes need to be backported to stable22 and calendar3.5
This can be fixed by moving the timezone settings from the browser local storage to the database. There already is a timezone select in the bottom left settings menu.
This task can be split into two sub tasks:
Mentioning the default behavior in our Calendar user documentation is also advisable. Notifications for all day events only work correctly if a timezone is configured or the user is in the same timezone as the server.
There's a CALDAV:calendar-timezone
property that's already used internally by SabreDAV free-busy stuff.
Then https://github.com/sabre-io/dav/blob/1ddd7733a3dbec1880f695e979e9272dfb0795aa/lib/CalDAV/ICSExportPlugin.php#L231-L247 looks like a reasonable logic to determine the tz.
I just can't find code that ever sets the property.
I just realized that the oc_calendars
table contains a timezone column, although it is null for most calendars on my dev instance. I wonder if it is related to this property.
Based on the Sabre code I would say yes, it's the same property.
It's the clients that set the property through CalDAV, but we can set it programmatically as well.
I'm able to set my calendar's TZ to Asia/Shanghai
and create an all day event for Saturday. My default reminder is 1h before the event.
With https://github.com/nextcloud/server/pull/36192 I get a reminder at 1674226800 = Fri Jan 20 23:00:00 CST 2023 With master I get a reminder at 1674255600 = Sat Jan 21 07:00:00 CST 2023
That is what we expect, right?
I would split this topic into the following pieces
1) Use the calendar's timezone data, if available, to generate correct reminder dates for all day events 2) Make sure our frontend sets a timezone for new calendars 3) Add a UI option to change the timezone of a calendar
https://github.com/nextcloud/server/pull/36001 made me think we also already have an core app config named timezone which we could set as default for the user's new calendars if none is set (including by this front-end).
- Make sure our frontend sets a timezone for new calendars
That is already the case thanks to Georg and his https://github.com/nextcloud/calendar/pull/1581
Apparently timezone is set for calendars created from the UI but not the auto-generated personal calendar. Something to investigate and fix, too.
However I don't think we have a way to generate VTIMEZONE
data from a TZID on PHP side…
https://github.com/nextcloud/server/pull/36522 just reuses data we have in calendar-js.
I know what I'm going to ask is crazy, but can we also set the TZ of both the start and end times independently? We would like to use the calendar for out employees flights, and they cross timezones often. Or should I open a new issue for that?
I know what I'm going to ask is crazy, but can we also set the TZ of both the start and end times independently? We would like to use the calendar for out employees flights, and they cross timezones often. Or should I open a new issue for that?
I think there's already a provision for a use case like that because of summer / winter time, at least that's what I gather from the RFC. Please open a ticket and I will look further into it (although it might take some time).
For clarification, apart from the reminders handling, you can already set different timezones for start and end times.
Steps to reproduce
Expected behavior
Reminder x hours before the day starts for me
Actual behaviour
Reminder x hours before the day starts for the server
Calendar app version
4.x
CalDAV-clients used
No response
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
No response
Database engine version
No response
PHP engine version
No response
Nextcloud version
24
Updated from an older installed version or fresh install
No response
List of activated apps
No response
Nextcloud configuration
No response
Web server error log
No response
Log file
No response
Browser log
No response
Additional info
No response