You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reasoning:
In the RecurrencePatternSerializer the RecurrencePattern.Until is necessarily converted to an IDateTime for serialization.
That's why it would be better to store it as an IDateTime from the beginning, instead of relying on RecurrencePattern.Until.Kind.
if(recur.Until!=DateTime.MinValue){varserializer=factory.Build(typeof(IDateTime),SerializationContext)asIStringSerializer;if(serializer!=null){IDateTimeuntil=newCalDateTime(recur.Until);// <<<<<<<<< The DateTimeKind is important hereuntil.HasTime=true;values.Add("UNTIL="+serializer.SerializeToString(until));}}
The text was updated successfully, but these errors were encountered:
Generally, using DateTime is a break in how date/time is represented throughout the library. In most (all?) other places, a date/time that represents a value from the RFC is implemented as IDateTime. Its not obvious, why this is different in the case of UNTIL. A reason might be, that UNTIL most often needs to be represented in UTC and sometimes as floating time (if DTSTART is floating), but never with timezone reference, so at first glance DateTime might seem sufficient. Nevertheless IDateTime aka CalDateTime would be the more natural fit, because
it can represent floating time vs UTC
it can represent DATE vs DATE-TIME
it is the way it is done throughout the lib
it doesn't have the ambiguity of DateTime, e.g. regarding DateTimeKind.Local.
Reasoning:
In the
RecurrencePatternSerializer
theRecurrencePattern.Until
is necessarily converted to anIDateTime
for serialization.That's why it would be better to store it as an
IDateTime
from the beginning, instead of relying onRecurrencePattern.Until.Kind
.The text was updated successfully, but these errors were encountered: