diff --git a/Source/Bogus/DataSets/Date.cs b/Source/Bogus/DataSets/Date.cs index d5997b0b..822f6142 100644 --- a/Source/Bogus/DataSets/Date.cs +++ b/Source/Bogus/DataSets/Date.cs @@ -178,12 +178,20 @@ private void ComputeRealRange(ref DateTime start, ref DateTime end) #if !NETSTANDARD1_3 var window = GetForwardDSTTransitionWindow(start); - if ((start > window.Start) && (start <= window.End)) - start = new DateTime(window.End.Ticks, start.Kind); + if ((start >= window.Start) && (start <= window.End)) + { + if ((start == window.Start) && (end >= window.Start) && (end <= window.End)) + end = start; + else + start = new DateTime(window.End.Ticks, start.Kind); + + if (start == end) + return; + } window = GetForwardDSTTransitionWindow(end); - if ((end >= window.Start) && (end < window.End)) + if ((end >= window.Start) && (end <= window.End)) end = new DateTime(window.Start.Ticks, end.Kind); if (start > end)