ical.net icon indicating copy to clipboard operation
ical.net copied to clipboard

Fix incorrect handling of UNTIL if falling into DST change and some related improvements

Open minichma opened this issue 9 months ago • 2 comments

Reproduce and fix #736. I.e. if UNTIL falls into a DST change with ambiguity, then recurrences could have missed, which is fixed with this PR.

Other improvements include:

  • Remove implicit conversion operator from System.DateTime to CalDateTime, which could cause confusion and was a source of bugs.
  • Remove AsUtc from CalDateTime.GetHashCode() to avoid timezone calculations
  • Avoid UTC conversion when comparing two CalDateTime if they have the same TzId

minichma avatar Feb 23 '25 15:02 minichma

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Ical.Net/DataTypes/CalDateTime.cs 25% 0 Missing and 3 partials :warning:
...alization/DataTypes/RecurrencePatternSerializer.cs 0% 1 Missing :warning:

:x: Your patch status has failed because the patch coverage (75%) is below the target coverage (80%). You can increase the patch coverage or adjust the target coverage. :x: Your project status has failed because the head coverage (66%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #738   +/-   ##
===================================
- Coverage    66%    66%   -0%     
===================================
  Files       105    105           
  Lines      4649   4633   -16     
  Branches   1151   1144    -7     
===================================
- Hits       3073   3054   -19     
+ Misses     1142   1139    -3     
- Partials    434    440    +6     
Files with missing lines Coverage Δ
Ical.Net/Evaluation/RecurrencePatternEvaluator.cs 91% <100%> (-<1%) :arrow_down:
...alization/DataTypes/RecurrencePatternSerializer.cs 72% <0%> (+1%) :arrow_up:
Ical.Net/DataTypes/CalDateTime.cs 86% <25%> (-4%) :arrow_down:

... and 1 file with indirect coverage changes

codecov[bot] avatar Feb 23 '25 15:02 codecov[bot]