Modified behavior to treat "floating" events found in a calendar with… #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… X-WR-TIMEZONE as if they are in the time zone specified
The code was crashing because of the check in is_UTC not checking if a
timezone existed or not. If there was no timezone, then the code
crashed. This matches the case of a "floating" event, which is normally
interpreted as being in the current time zone.
This change treats these "floating" events as if they are in the
timezone specified by X-WR-TIMEZONE, and not as "floating" events.
Based on u01jmg3/ics-parser#245 and
https://blog.jonudell.net/2011/10/17/x-wr-timezone-considered-harmful/,
and a calendar a user sent me, I think this is what was intended by the
calendars' authors. It's hard to say for sure, though, since I've been
unable to find any definitive documentation, only educated guesses.
Note: New tests were added, and the existing tests still pass with
these changes.