Inkycal
Inkycal copied to clipboard
Allow All-Day events to be less than a day (DST)
This allows for all-day events that are less than 24 hours, as they might fall between DST-changes
As we have seen in #184 , all-day-events aren't correctly identified when the event spans a timezone change such that the day has 23 instead of 24 hours.
Such an event would, for example span the following interval:
START: 2021-03-28T00:00:00+01:00
END: 2021-03-29T00:00:00+02:00
DUR: 23:00:00
The original algorithm already checked for the time-portion of the event. This change gives a little bit more leniency. This also allows for TZ changes of more than one hour. I think half a day is enough. Can't imagine a situation where an event is all day but less than 12 hours from 00:00 to 00:00. I guess something along the lines of >=22 hours
would be fine as well. I am not aware of DST changes of more than 2 hours.
After the changes, we correctly see this (from the google calendar ical of german holidays)
Edit: it seems that #161 maybe addresses similar issues. This here PR aims to be minimally invasive and is just there to fix the specific DST issue going from normal to summer time.
Thanks for your PR @maweki . The changes are looking good, once I have done some testing, I'll give some additional feedback.
@maweki I went ahead and tested this and didn't see any initial problems. However, this is only applicable for events that fall on the date of daylight savings, right? So I will keep testing.
this is only applicable for events that fall on the date of daylight savings, right?
Yeah. Events from 0:00 to 0:00 that are not 24 hours are not seen as a "day event". Maybe 12 is too low and 22 is enough. This kinda "breaks" (or works if you will) if you have an event with otherwise different timezones.
So you can test it with an event that starts 0:00 in one timezone and ends 0:00 in the timezone eastwards. But that's kinda also a "day-event", even if your day ends due to travel eastwards. We just have to limit how many hours do indeed constitute a whole day. I think at least 22 should be fine.
Marking this PR as stale due to inactivity
Marking this PR as stale due to inactivity