Skip to content

Commit c1d9aea

Browse files
authored
Improve reliability on non-UTC systems (#5547)
1 parent 5ba013b commit c1d9aea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ public DateHistogramAggregationWithHardBoundsUsageTests(ReadOnlyCluster i, Endpo
224224

225225
var projects = Project.Projects.OrderBy(p => p.StartedOn).Skip(2).Take(5).ToArray();
226226

227-
_hardBoundsMinimum = projects.Min(p => p.StartedOn.Date);
228-
_hardBoundsMaximum = projects.Max(p => p.StartedOn.Date);
227+
_hardBoundsMinimum = projects.Min(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
228+
_hardBoundsMaximum = projects.Max(p => DateTime.SpecifyKind(p.StartedOn.Date, DateTimeKind.Utc));
229229
}
230230

231231
protected override object AggregationJson => new

0 commit comments

Comments
 (0)