-
Notifications
You must be signed in to change notification settings - Fork 231
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
release 2.3.34 breaking changes against RFC5545 for TZID with UTC #263
Comments
You consider that a breaking change? |
This could be a gray area of breaking change. As I said, the new serialized result is correct technically, but just breaking my existing test cases assuming that the round trip of deserialization and serialization get the same iCal text. The change in 2.3.4 is not really breaking the standard, but it will be nice to respect that The "TZID" property parameter MUST NOT be applied to DATE properties and DATE-TIME or TIME properties whose time values are specified in UTC. So that the serialized time property text could be shorter: As you can see most examples in rfc5545 use the shorter form. I know that logically the standard does not mandate that the round trip of deserialization and serialization produce the identical texts. However, in the past when doing serialization for other types of projects, I had found that if the round trip produce the same texts, it could make the unit testing and integration testing for the lib and the applications become easier. |
Right. If you don't specify a DTSTAMP, for example, the text will never be identical, as an example. I agree that it seems like it should be identical in most cases, but it often won't be. I think checking for semantic equality is always the best approach. Checking text is brittle. Some things are modeled as Textual equality is fraught with peril.
Having the I'm sympathetic to your request. Maybe there should be a switch to use These are the weaknesses of the current API. With this change, I have made the ownership of the time zone a property of the parent list. Maybe that's not the best choice, but it can evolve with time. Another reason to prefer explicit TZID: Telerik's libraries don't understand the Z suffix when deserializing to |
And I have just located the change you made a few days ago where you had made such in-source comment:
I would say that the dday.ical way is part of the rfc5545 as indicated in comments above. However Telerik's RadSchedule is problematic not respecting the spec well, so it will be better to raise a ticket asking the telerik team to fix it. Meanwhile, before the telerik's team could fix it, it may be good to have a switch in ical.net to support both the telerik way and the dday.ical way, since not every ical.net users are using telerik components. |
Actually, if:
page 28 of RFC5545:
The "TZID" property parameter MUST NOT be applied to DATE properties and DATE-TIME or TIME properties whose time values are specified in UTC
And the old version adhered to this whereas the new one doesn't then one
could (and probably should) consider it a breaking change, not a gray area.
If RFC says no "TZID=UTC" if there is already a 'Z' at the end of it then
it's obvious RFC has been broken.
No offence meant, not being an ass, just pointing out a "technicality". So
even if the example date stamp is valid in a broader sense it's invalid per
RFC.
And from my ublnderstanding of github rules, "fonlow" just volunteered to
fix it.
|
thanks for your detailed explanations quite inspiring. @"checking for semantic equality is always the best approach. Checking text is brittle. Some things are modeled as HashSet behind the scenes, which have no ordering guarantees." I very much agree on that, as I have been doing with XML serialization. I had actually forked this project however, would like to listen to more contexts before committing altering the codebase. |
Yeah, you're right. That being said, ical4j doesn't consider it an error, either. I'm not sure why that restriction is in the spec... there doesn't seem to be a good reason for it? I don't view slavish adherence to the ical spec to be a main goal of ical.net, though I do try to let the spec guide the development where and when possible. There will always be tension between the real world and spec-based pedantry. As in this case, particularly where other libraries are concerned. :) |
I think the spec had provided some flexibility that both formats are correct, while a technical implementation may pick either or both. It is a bit ashamed that telerik supports only the one with TZID. @rjanjs, I agree with you on your way of making balance and trade-off. Just for your reference, I had just checked Google Calendar, and found the Google Calendar export to ics always using yyyyMMddTHHmmssZ UTC format without using TZID which GC could import both formats correctly. This means Telerik Scheduler could not handle properly ics exported from Google Calendar. Obviously Telerik Scheduler has a bug, while the change in ical.net 2.3.34 is a workaround to take care of telerick scheduler users. As far as I could see now, ical.net 2.3.33 support both formats in serialization and deserialzation, while in 2.3.34, support both formats in deslerialization and only the TZID format for serialization. Still within the spec. Not a bad trade-off. |
I haven't read the RFC, but the new version does not seem to work with outlook! |
@atajadod , can you be more specific about what not working? |
Can you be more specific? Also, what happens if you open your calendar file, and stick I'm not sure how well a bool
Would that make Telerik, Outlook, Google, and ical.net happy? Edit: ical4j flags it as an error. |
Notes for myself: break was from PR #261 |
@zijianhuang, if everything's fine, outlook shows me a calendar but in this case it shows me a .ics attachment with a name like "not supported format" of so. |
@atajadod - Can you open the broken |
@rianjs here you go |
@rianjs if you prefer text:
|
I'm going to put the |
Do you have a rough ETA on when it will be reverted to zulu suffix? |
I'd like to say "soon", but I have a lot on my plate right now. The pull request that broke the behavior is linked above, and I'm happy to review, merge, and publish a pull request that unbreaks the |
Bump version numbers and update readme for nuget publish #263
Available in:
|
in 2.3.3, the following ical text could be correctly deserialized and then serialized :
However, in 2.3.4, the serialized text becomes:
Technically this is correct, however, just more verbose. And according to page 28 of RFC5545:
The "TZID" property parameter MUST NOT be applied to DATE properties and DATE-TIME or TIME properties whose time values are specified in UTC.
It will be nice that TZID is not specified if the time is in UTC, just as 2.3.33 supports.
The text was updated successfully, but these errors were encountered: