-
Notifications
You must be signed in to change notification settings - Fork 234
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How to associate a timezone to an all-day event #716
Comments
Hi! Would you agree that as of RFC5555 section 3.3.4, a DATE property cannot have a timezone? |
Hi! I think that section is about a DATE value, not a DATE property. When I look at the DTSTART and DTEND properties, I see they can have either a DATE or DATE-TIME value, but also parameters like TZID. It is not clear to me that you cannot use a TZID parameter with a DATE value. So I think that you can use a TZID parameter with a DATE value. |
A certain evidence could be, that Google Calendar and Microsoft Outlook don't add a timezone to all-day events as well. Just double-checked that this is the case.
|
To fully address your use case: If you want the all-day event to be associated with a specific timezone, you can add a default VTIMEZONE to the calendar. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Good work on the progress on V5! I found a regression in the 5.0.0-daily.3 pre-release though. In V4 I could specify a timezone for all-day events (where the start and end have no time component) and ical.net would serialize the timezone for all-day events.
using the following code
In V5 ical.net no longer serializes the timezone for all-day events
using the following code
It is important for me to specify a timezone for all-day events. When I have an all-day event specified in the PST timezone and view this event in a calendar user-interface component in the GMT timezone then it should not show it as an all-day event in the GMT timezone. Perhaps if I have an all-day event without specifying a timezone, it might show as an all-day event in any timezone (or only the system local timezone), but when I explicitly specify a timezone for the all-day event then it is an all-day event in that timezone only, because the start of the day in PST is not at the same (UTC) time as the start of the day in GMT (even daylight saving transitions in PST and GMT are not on the same day). Especially when I look for overlapping occurrences of events in different timezones, I need to know the timezone for all-day events the same as for non-all-day events.
Note that in V5 the constructors of CalDateTime do not make it easy to specify a timezone for an all-day event. It would be good if the overloads that take a DateOnly or (year, month, day) would also accept an optional timezone.
I also wonder if I should create the CalendarEvent with a Duration instead of an End date, but I believe it should work with an End date as well as long as I set hasTime to false and the effective duration is one day (or more). Please confirm.
It would also be good if CalendarEvent could have read-only properties for EffectiveEnd and EffectiveDuration like the CalPeriod of an Occurrence. CalendarEvent, CalPeriod and Duration could also benefit from a read-only ExactDuration property that returns a TimeSpan.
Thanks
-Remco
The text was updated successfully, but these errors were encountered: