Skip to content

Nothing pins that DateTimeRange Shift, Expand and Split keep DateTimeKind #221

Closed

Description

@CaffeinatedCoder

Problem

Nothing pins that DateTimeRange.Shift, Expand and Split keep each bound's DateTimeKind. The pre-tag analysis (#179) seeded value => new DateTime(value.Add(delta).Ticks) into both bounds of Shift. Every behavioural test passed: core, NodaTime, EF, EF-NodaTime and integration. Only EveryWaiver_StillMatchesADivergence failed, and only because the source text no longer matched a clone waiver. Any edit there would trip it, so it pins nothing.

The current code is right. DateTimeKind matters because the EF read leg treats Unspecified and Local differently from Utc (E09).

Change

A test that, for each Kind (Unspecified, Local, Utc), holds Start.Kind and End.Kind through Shift, Expand and every Split piece, for DateTimeRange (and DateTimeOffsetRange's offset, if the analysis applies there too). Seed the defect above and show the test fails.

Activity

  1. added this to the 10.0.0 milestone on Oct 18, 2026
  2. added
    tests
    area/ranges
    package/core
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/rangespackage/coretests

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions